-
Notifications
You must be signed in to change notification settings - Fork 282
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
wallet: --preload-all option to load all wallet on open. #803
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
nodech
added
quick
review difficulty - easy
wallet
part of the codebase
breaking-minor
Backwards compatible - Release version
labels
Jan 20, 2023
nodech
force-pushed
the
preload-wallets
branch
from
January 20, 2023 18:12
46edcc1
to
a1dd9a3
Compare
nodech
force-pushed
the
preload-wallets
branch
2 times, most recently
from
January 26, 2023 14:20
2f5576c
to
a2e16d5
Compare
nodech
force-pushed
the
preload-wallets
branch
from
October 20, 2023 11:06
a2e16d5
to
54a068a
Compare
nodech
force-pushed
the
preload-wallets
branch
from
October 20, 2023 11:10
54a068a
to
b12650d
Compare
This with a new data dir seems to error: hsd --prefix /tmp/hsd_3 --network regtest --wallet-preload-all [...snip...]
[info] (wallet) Opening WalletDB...
[info] (wallet-migrations) Fresh start, saving last migration id: 3
[info] (wallet) WalletDB is loading (depth=0, height=0, start=0).
[info] (wallet) Created account primary/default/0.
[info] (wallet) Wallet initialized (primary).
[info] (wallet) Created wallet primary in WalletDB.
[info] (wallet) Loaded primary wallet (id=primary, wid=0, address=rs1qmx3ulagg84y5jc3prga2zv4lf66weaqw6qdywh)
[info] (wallet) Preloading all wallets...
TypeError: Invalid type for database key.
at Object.write (/media/data/Projects/handshake/hsd/node_modules/bdb/lib/key.js:98:7)
at BaseKey.encode (/media/data/Projects/handshake/hsd/node_modules/bdb/lib/key.js:398:20)
at Key.encode (/media/data/Projects/handshake/hsd/node_modules/bdb/lib/key.js:478:22)
at WalletDB.getID (/media/data/Projects/handshake/hsd/lib/wallet/walletdb.js:958:45)
at WalletDB._get (/media/data/Projects/handshake/hsd/lib/wallet/walletdb.js:1000:27)
at WalletDB.preloadAll (/media/data/Projects/handshake/hsd/lib/wallet/walletdb.js:276:18)
at async WalletDB.open (/media/data/Projects/handshake/hsd/lib/wallet/walletdb.js:241:5)
at async Plugin.open (/media/data/Projects/handshake/hsd/lib/wallet/plugin.js:92:5)
at async FullNode.openPlugins (/media/data/Projects/handshake/hsd/lib/node/node.js:475:9)
at async FullNode.open (/media/data/Projects/handshake/hsd/lib/node/fullnode.js:298:5) |
Looks like normal load calls [info] (wallet) WalletDB is loading (depth=1, height=0, start=0).
wdb.getID got wid: 0
[info] (wallet) Wallet opened (primary).
[info] (wallet) Loaded primary wallet (id=primary, wid=0, address=rs1qmx3ulagg84y5jc3prga2zv4lf66weaqw6qdywh)
[info] (wallet) Preloading all wallets...
wdb.getID got wid: primary
TypeError: Invalid type for database key. |
nodech
force-pushed
the
preload-wallets
branch
from
December 4, 2023 09:12
06d8fd1
to
3b03d7e
Compare
rithvikvibhu
approved these changes
Dec 4, 2023
Merged
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
breaking-minor
Backwards compatible - Release version
quick
review difficulty - easy
wallet
part of the codebase
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In some cases loading wallet lazily is not good enough. if wallet open takes some time (e.g. because of the plugin) - first http request to the wallet will be responsible for opening the wallet. This PR allows users to load all wallets before HTTP service is started, guaranteeing the wallet will be available before starting HTTP server.
By default this is set to
false
.