wallet: Remove first parameter to ScanForWalletTransactions start_hash#19216
wallet: Remove first parameter to ScanForWalletTransactions start_hash#19216pstratem wants to merge 1 commit intobitcoin:masterfrom
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
Is there a reason you didn't remove the start_block variable?
There was a problem hiding this comment.
i didn't want to change the function called but i guess i should
There was a problem hiding this comment.
I think this can be removed now that block hash is gone.
promag
left a comment
There was a problem hiding this comment.
Concept ACK dropping one of the start args. I have a preference to keep start_block hash instead.
5586ef7 to
8d8e4d3
Compare
|
@promag im using the block height because everything that calls it is using the block height |
src/wallet/rpcwallet.cpp
Outdated
There was a problem hiding this comment.
I think this can be removed now that block hash is gone.
Every caller looks up the block hash from a block height immediately before calling.
8d8e4d3 to
dbd8498
Compare
|
@promag the rescan is pretty ambiguous to start with, it's scanning whatever the current active chain is edit: the entire concept in theory should do nothing so it's a much "fuzzier" thing than other wallet ops that handle reorgs cleanly |
|
Code review ACK dbd8498, dropped unnecessary statement since last review |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
|
This isn't a good change, I think. It doesn't simplify the code very much, and makes the scanning code less correct and more fragile. The problem is the new
Calling In general, the only correct way for wallet code to reference blocks is by hash and not by height, and this PR moves in the less correct direction. Also, while |
I've mentioned this before, but considering @ryanofsky comment #19216 (comment) and @ariard work I agree that this is not worth it. |
|
Another option could be to drop the start_height argument and keep the start_block argument |
|
Closing for now. |
Every caller looks up the block hash from a block height immediately before
calling.