-
Notifications
You must be signed in to change notification settings - Fork 36.3k
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
re-enable wallet in autoprune #6057
re-enable wallet in autoprune #6057
Conversation
Nice! I'm glad you looked at this. The way you checked |
Right. I did ignore the fact that blocks are not fly in in order. Will change it to your proposed way of scanning backwards.
|
else | ||
return InitError(_("Can't run with a wallet in prune mode.")); | ||
if (GetBoolArg("-rescan", false)) { | ||
return InitError(_("Rescans are not possible in pruned mode. You might use -reindex which then download the whole blockchain again.")); |
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.
This message is unclear to me. Do you mean:
"Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again."?
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.
Thanks!
English is not my mother language and I always struggle with it.
Feel free to also correct/rewrite the other warnings and errors (as well as the code comments).
37cf0f4
to
9c28a03
Compare
Fixed |
81cfaf6
to
35d22de
Compare
Concept & code review ACK, but this definitely needs testing. |
Also applied an additional test during wallet catchup-rescan if the previous block has TXs but no data to be sure we have pruned this block. |
3942591
to
3774c90
Compare
3774c90
to
d36bee5
Compare
import functions could lead to a rescan beyond prune level
d36bee5
to
7e6569e
Compare
Rebased. |
else | ||
return InitError(_("Can't run with a wallet in prune mode.")); | ||
if (GetBoolArg("-rescan", false)) { | ||
return InitError(_("Rescans are not possible in pruned mode. You will need to use -reindex which will download the whole blockchain again.")); |
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.
What prevents this error if the user has passed -reindex? In particular, a pruned node may not have the space for the whole blockchain, and may need to redownload it with pruning enabled.
(... btw, does -reindex actually work correctly with pruned data? I think last time I tried, it ignored blocks after the first missing one, and redownloaded/reappended them...)
utACK. |
7e6569e [squashme] improve/corrects prune mode detection test for required wallet rescans (Jonas Schnelli) 7a12119 [RPC] disable import functions in pruned mode (Jonas Schnelli) 3201035 [autoprune] allow wallet in pruned mode (Jonas Schnelli)
7e6569e [squashme] improve/corrects prune mode detection test for required wallet rescans (Jonas Schnelli) 7a12119 [RPC] disable import functions in pruned mode (Jonas Schnelli) 3201035 [autoprune] allow wallet in pruned mode (Jonas Schnelli)
Bitcoin 0.12 wallet PRs 1 Cherry-picked from the following upstream PRs: - bitcoin/bitcoin#6057 - bitcoin/bitcoin#6415 Part of #2074. Closes #3700.
No description provided.