-
Notifications
You must be signed in to change notification settings - Fork 38.7k
Automatically rescan after restoring wallet.dat #152
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
Conversation
|
One thing I did not test, is the slowdown. Continuously creating CBlockLocator's and writing them to wallet.dat may slow down initial block download. |
|
Nice! RE: block download speed: I'd suggest a check for if IsInitialBlockDownload() and don't bother writing best-block-index during the initial block download. |
|
Ok, updated. |
|
Looking at this again and thinking about pulling, it seems more complicated than it needs to be-- CBlockLocator can already serialize/deserialize itself, is there a reason for the ReadBestBlock/WriteBestBlock methods? Why not just Read/Write the CBlockLocator instead of CBLockLocator.vHave? |
Information about the best known chain is added to wallet.dat. If this information does not match the data in blkindex.dat, a rescan is automatically performed, starting from the the last known block. When upgrading from a wallet which does not have this information, no rescan is done automatically.
|
I didn't realize db.h did define classes from main.h as well, to use them. I added CBlockLocator to those and simplified the patch. |
|
Pulled via cherry-pick. |
MetaDEx guide - add link to lodge feedback
…move_obsolete_rpc-tests_shell_script remove rpc-tests.sh which was replaced by Python script
Github-Pull: bitcoin#152 Rebased-From: 2024110
Design 0.6 and renaming
…take Change GetProofOfStake to use header prevout info instead of transaction data
0.16 updates for v0.16.4.1
Autoconceal nits
4cf815e Add release notes entry for encodings. (Daniel Kraft) 810bc13 Support -name/valueencoding for namecoin-tx. (Daniel Kraft) 20ab39a Handle encodings on the output side. (Daniel Kraft) 482c30e Explicitly use UTF-8 for name_filter regexp check. (Daniel Kraft) ee7fba9 Introduce EncodeNameForMessage for logs / errors. (Daniel Kraft) 80f8ba0 Move names/encoding library to common lib. (Daniel Kraft) 0688f01 Remove ValtypeFromString. (Daniel Kraft) 9367b48 Use configured encoding for "input" names/values. (Daniel Kraft) 7e364eb Add -nameencoding / -valueencoding options. (Daniel Kraft) b6b8483 Add new names/encoding source files. (Daniel Kraft) 0a1c72e Expose univalue's UTF-8 validation logic. (Daniel Kraft) Pull request description: This implements the main part of the proposal in bitcoin#246: New `-nameencoding` and `-valueencoding` options are added, with the possible values of `ascii`, `utf8` and `hex`. They specify in which encoding name and value data is expected in RPC arguments and returned in JSON fields. This fixes a long-standing issue Namecoin had with binary data that was invalid UTF-8 (as well as adding proper support for real binary data in the RPC interface). As a consequence, this likely resolves (or is at least a big part of the solution of) bitcoin#152 and bitcoin#170. Still missing for a full solution of bitcoin#246 is the possibility to specify per-RPC encodings in an `options` RPC argument. For now, the encodings can only be set for the full process at startup time through the config options. Tree-SHA512: b221c3ccf421517be3419aec568e02475c2562fa1e99a70b7c53332ce343dc78a537285183262b270fb676f7c39cf16a9e58cb8160e2e4653211d0daa77e0437
Information about the best known chain is added to wallet.dat. If this
information does not match the data in blkindex.dat, a rescan is automatically
performed at startup, starting from the the last known block. When upgrading from a wallet
which does not have this information, no rescan is done automatically.