Review report

core: PR #36494

2 suggestions

Earlier concerns neither republished nor resolved: 2 suggestions. See the Run archive for their assessments.

Optional improvements

Link

[suggestion] · Explicit null options fail after coin selection and signing

The release note overstates the new type check: explicit nulls pass it and can produce a late RPC error, leaving selected inputs locked in memory.

Location: src/wallet/rpc/spend.cpp:1405 (head).

Details and suggested fix

RPCTypeCheckObj allows null values, but FinishTransaction treats a null-valued psbt or add_to_wallet key as present and then throws when it calls get_bool(). By then, coin selection has run, the wallet has signed the PSBT, and lock_unspents: true may have locked the selected inputs in memory. For example, options={"lock_unspents": true, "add_to_wallet": null} returns an RPC error and leaves the inputs locked until unlockunspent or a restart. A null lock_unspents value also fails after coin selection. This is not a regression: the base version handled wrongly typed values the same way, and send also handles nulls this way. No in-tree caller passing explicit nulls for these options was identified, so production impact is unconfirmed. Either qualify the release-note claim to exclude null values, or, if the stronger guarantee is intended, reject explicit nulls for options read with get_bool() or getInt() before coin selection.


Link

[suggestion] · Tests do not pin option checking before fee-argument merging

The new tests would still pass if the strict option check moved below fee-argument merging, despite the different error that ordering would produce for a misspelled estimate_mode.

Location: test/functional/wallet_sendall.py:288 (head).

Details and suggested fix

Neither new assertion sets conf_target, so neither verifies that unknown options are rejected before fee arguments are merged. If RPCTypeCheckObj moved below InterpretFeeEstimationInstructions, a call with options={"conf_target": 2, "estimate_mod": "economical"} would fail with -8, “Specify estimate_mode,” instead of -3, “Unexpected key estimate_mod.” Add an assertion for this call that expects -3 and “Unexpected key estimate_mod.” The call fails before coin selection, so it needs no UTXOs.


Coverage details

Earlier concerns

Earlier reports raised these, with the titles and severities shown there. This review neither republished nor resolved them.