Review report

bitcoin/bitcoin: PR #36333

2 suggestions

Optional improvements

Link

[suggestion] · The replacement #21647 test no longer proves spend insertion

The descriptor import rescans the recent funding and spending blocks, so the final presence assertion can pass even if the subsequent spend import returns success without storing the transaction.

Location: test/functional/wallet_importprunedfunds.py:130 (head).

Details and suggested fix

Here, "now" resolves to tip MTP, and the descriptor import rescans from two hours before that time. The scan adds the funding transaction through IsMine and then the spend through IsFromMe, so fresh_wallet already contains spend_txid before either explicit import. Unlike the removed absent-then-present check, the final assertion therefore does not establish that importprunedfunds inserts an unknown spend. An IsMine-only rejection would still fail this test; the missing coverage is success without insertion. Advance mocktime on both nodes to more than two hours after the spend block and mine enough blocks for tip MTP to pass that cutoff before creating fresh_wallet. Assert descriptor-import success and absence of both transactions before the explicit imports, then retain the final presence assertion. A future numeric descriptor timestamp alone is insufficient because lowest_timestamp starts at the tip block time and only decreases.


Link

[suggestion] · The test retains an unused removeprunedfunds opt-in

Both test nodes still receive -deprecatedrpc=removeprunedfunds even though this PR removes the RPC and every test call that needed it.

Location: test/functional/wallet_importprunedfunds.py:134 (base).

Details and suggested fix

The extra_args assignment in set_test_params now enables nothing. The generic -deprecatedrpc option accepts this value, so it does not cause a startup failure, but retaining it suggests that the remaining importprunedfunds coverage requires a deprecated feature. Delete the assignment so the test uses the default arguments.


Coverage details