Is there any moethod to verify wallet integrity?
Loading a wallet verifies integrity every time.
Hello achow101, thank you for your answer. I didn't have time to check the source code on github, but when you says that the wallet is verified at each load, does bitcoin core verify the priv keys corrisponding to the pub keys? even if encrypted? For example checking a saved priv key checksum in the wallet?
....
Regarding the second question something seems off.
One wallet has a lot of transactions and different addresses.
The newer wallet has few transactions and no additionals created addresses.
So my natural question is. How is it possible for the newer wallet with some few transactions to weight so much in bytes?
Is there any method to output in a plain text the content of the db?, even with encrypted private keys, to just see what's different inside them?
Is there any moethod to verify wallet integrity?
Thanks
Whenever you create a wallet (which is now generated by default in descriptor format), each descriptor generates up to 1000 keys by default. You can set the number using the command line option keypoolrefill. This acts as a gap limit, that is, when this "limit" is reached, the wallet generates another 1000 keys, and so on.
So even if you have a more recent wallet.dat file and haven't clicked to generate new addresses, these addresses, not yet displayed in the GUI, are actually stored in your wallet.dat keystore.
All new keys generated will be derived from your extended private key from your descriptor, so there's no need to worry about making a new backup.
This is why both keystores are the "same size", the addresses are already "pre-generated" in your keystore and they will be displayed in the GUI as you click to "generate a new receiving address".
See more details at:
https://bitcoincore.org/en/doc/30.0.0/rpc/wallet/keypoolrefill/Thank you Forsyth Jones for answering. The question was a bit different. Having 2 wallets, one older with more transactions and another newer with few transactions, how is it possible that the newer size in bytes is double?