-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Optional update rescan option in importmulti RPC #11484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optional update rescan option in importmulti RPC #11484
Conversation
promag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe option should be just update? Needs a test thought.
src/wallet/rpcdump.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove : <false>, these <false> and <true> will be removed IMO.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See:
bitcoin/src/wallet/rpcwallet.cpp
Line 3060 in 364da2c
| " \"replaceable\" (boolean, optional, default true) Whether the new transaction should still be\n" |
src/wallet/rpcdump.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove comment.
f8cb517 to
b20645a
Compare
Just |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing test test.
Regarding the option name, even rescanUpdate doesn't really explain the underlying consequence. Maybe onlyNotifyNew=false or notifyExisting=true.
src/wallet/rpcdump.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New code should be snake_case, without the prefix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also rename the other variables on this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just new code.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| {"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).