mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Merge bitcoin/bitcoin#25896: wallet: Log when Wallet::SetMinVersion sets a different minversion
835bd27e9a
Wallet::SetMinVersion - Log the new minversion (Ali Sherief) Pull request description: This change prints a single additional line in the debug.log when bitcoin-cli loads a wallet using `loadwallet` (*not* `createwallet`). When Bitcoin Core creates a wallet, it's `minversion` is set to `FEATURE_BASE`, which is 10500. However, once the wallet is unloaded using `unloadwallet` or through program termination, and subsequently loaded again, `loadwallet` updates the `minversion` in the wallet.dat file to `FEATURE_LATEST`, currently 169900. The current logging format prints the very old wallet version during `createwallet`, and then the actual version in calls to `loadwallet`. This has confused at least one person ([reference](https://bitcointalk.org/index.php?topic=5410650.0) - I was the one who asked there if there were plans to change that behavior, and was subsequently redirected here by achow), so it will be very helpful to users to explicitly specify in the logs what the walletdb is doing. ACKs for top commit: achow101: ACK835bd27e9a
Tree-SHA512: 967c8c617e06a84915ddb147378ec3c8b0343e45f43145ec78df9cbc0201867f49c8e11cd068c403eb5ec06e07d38c3c0d3864dad8edc5efbb134a3fb30be41f
This commit is contained in:
commit
80da4be57b
1 changed files with 1 additions and 0 deletions
|
@ -542,6 +542,7 @@ void CWallet::SetMinVersion(enum WalletFeature nVersion, WalletBatch* batch_in)
|
|||
LOCK(cs_wallet);
|
||||
if (nWalletVersion >= nVersion)
|
||||
return;
|
||||
WalletLogPrintf("Setting minversion to %d\n", nVersion);
|
||||
nWalletVersion = nVersion;
|
||||
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue