Recommend to perform testing on `regtest` or else this process may take a very long time.
Backup and then remove your current wallet if applicable
make check
./bitcoind -upgradewallet=160300
./bitcoin-cli getwalletinfo > preupgradewalletinfo
./bitcoin-cli generate 1
Kill bitcoind
./bitcoind -printtoconsole -upgradewallet
bitcoind should output to console the two following lines:
Performing wallet upgrade to 190700
Upgrading wallet to use HD chain split
Compare previous `preupgradewalletinfo` with `./bitcoin-cli getwalletinfo` post upgrade
preupgradewalletinfo:
{
"walletname": "",
"walletversion": 160300,
"balance": 0.00000000,
"unconfirmed_balance": 0.00000000,
"immature_balance": 0.00000000,
"txcount": 0,
"keypoololdest": 1551725443,
"keypoolsize": 1000,
"keypoolsize_hd_internal": 1000,
"paytxfee": 0.00000000,
"hdmasterkeyid": "c13ec93790a56f74edd2da42d231317eb6dbf02b"
}
post upgrade wallet info:
{
"walletname": "",
"walletversion": 190700,
"balance": 0.00000000,
"unconfirmed_balance": 0.00000000,
"immature_balance": 50.00000000,
"txcount": 1,
"keypoololdest": 1551725443,
"keypoolsize": 1000,
"keypoolsize_hd_internal": 1000,
"paytxfee": 0.00000000,
"hdmasterkeyid": "c13ec93790a56f74edd2da42d231317eb6dbf02b"
}
The newly upgraded wallet should not be able to be downgraded to a previous version
Kill bitcoind
./bitcoind -upgradewallet=160300
This should fail and cause `bitcoind` to shutdown with the following line:
Error: Cannot downgrade wallet