-
Notifications
You must be signed in to change notification settings - Fork 575
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
Add package wtxmgr to use walletdb interface #154
Conversation
Thanks @tuxcanfly. I'll go through and review this as time permits. It's obviously a huge change. |
Thanks, please start with #155. Will be working on docs, cleanup and refactor of this PR meanwhile. |
5ee1965
to
4c74c6a
Compare
// outputs spendable with wallet keys and transactions that are signed by | ||
// wallet keys in memory, handle spend tracking for newly-inserted | ||
// transactions, report the spendable balance from each unspent | ||
// transaction output, and finally to provide a means to serialize the |
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 section is no longer true.
There is a major lack of comments. Tons of unexported functions without comments, details not explained, etc. |
@davecgh Sorry, let me get those and also incorporate suggestions from the previous PR and get back to you before reviewing this. |
@tuxcanfly No rush on this. It's going to take a while to get through it all and I still have more to review on the other PR too. Just was taking a quick perusal through this. |
OK, thanks. I have already addressed most of the items in the other PR, so shouldn't be long before getting back to this. |
434d15f
to
90ab004
Compare
Rebased on top of |
63004fd
to
33d1b32
Compare
One of the things we'll need before this can go in is a new RPC to force the txstore to be recreated. Perhaps something like "recalculatebalances". Previously, if anything got out of sync, we could simply delete the separate file to force this to happen, but that will no longer be possible once it's part of the overall wallet database. This becomes particularly important when BIP0032 keys are being used since a user could easily generate the next keys in sequence from something external and receive funds to them. The wallet would obviously not yet know about these. Subsequent calls to getnewaddress would, of course, make them known to wallet, but at that point it won't be rescanning those earlier blocks where the funds were received. |
We will want this in before merging the walletdb integration. Can you rebase on top of the intwaddrmgr branch? Also if possible, can you switch the PR from master to intwaddrmgr so it only includes new commits not already on intwaddrmgr? (I don't know if github allows this) |
This commit converts the wallet to use the new secure hierarchical deterministic wallet address manager package as well as the walletdb package. The following is an overview of modified functionality: - The wallet must now be created before starting the executable - A new flag --create has been added to create the new wallet using wizard style question and answer prompts - Starting the process without an existing wallet will instruct now display a message to run it with --create - Providing the --create flag with an existing wallet will simply show an error and return
Previously a runtime.GC was being invoked which forced it to release the memory as far as the garbage collector is concerned, but the memory was not released back to the OS immediatley. This modification allows the memory to be released immedately since it won't be needed again until the next wallet unlock.
Rebased on top of intwaddrmgr. Looks like we'll need to create a new PR with the base branch as intwaddrmgr instead of master. |
Okay, it's a pain but I think that's the best solution. You can close this one and reference it from the new one. |
Done, closing in favor of #190 |
Prevent pasting in backup seed textbox
NOTE: This pull request requires #147
Moved
txstore
tolegacy
and added packagewtxmgr
which provideswalletdb
support.Legacy
txstore
will be imported as a part of the wallet setup as implemented in #147.Working on docs, cleanup and rebase.