Optional update rescan option in importmulti RPC#11484
Optional update rescan option in importmulti RPC#11484pedrobranco wants to merge 1 commit intobitcoin:masterfrom
Conversation
promag
left a comment
There was a problem hiding this comment.
Maybe option should be just update? Needs a test thought.
src/wallet/rpcdump.cpp
Outdated
There was a problem hiding this comment.
Remove : <false>, these <false> and <true> will be removed IMO.
There was a problem hiding this comment.
See:
bitcoin/src/wallet/rpcwallet.cpp
Line 3060 in 364da2c
src/wallet/rpcdump.cpp
Outdated
f8cb517 to
b20645a
Compare
Just |
src/wallet/rpcdump.cpp
Outdated
There was a problem hiding this comment.
Nit, care to remove : <false> here too?
Maybe
Yes, I will add it soon. |
|
After checking the The |
b20645a to
dc31515
Compare
|
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/rpcdump.cpp
Outdated
There was a problem hiding this comment.
New code should be snake_case, without the prefix
There was a problem hiding this comment.
Should we also rename the other variables on this method?
dc31515 to
0482356
Compare
0482356 to
2fd985d
Compare
|
This definitely needs a test. |
| {"options", RPCArg::Type::OBJ, /* opt */ true, /* default_val */ "null", "", | ||
| { | ||
| {"rescan", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "true", "Stating if should rescan the blockchain after all imports"}, | ||
| {"update", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "true", "Stating if rescan should notify existent transactions"}, |
There was a problem hiding this comment.
| {"update", RPCArg::Type::BOOL, /* opt */ true, /* default_val */ "true", "Stating if rescan should notify existent transactions"}, | |
| {"update", RPCArg::Type::BOOL, /* default */ "true", "Stating if rescan should notify existent transactions"}, |
This PR adds a new option
rescanUpdateinimportmultiRPC method to optionally do not rescan transactions that already exist in the wallet.This is very important for large wallets when importing a single address with a old timestamp, which in this moment triggers a rescan to the whole wallet, replaying several already known wallet events (via notify-wallet).