Page MenuHomePhabricator

Bump wallet version for pre split keypool
ClosedPublic

Authored by nakihito on Oct 3 2019, 19:34.

Details

Reviewers
deadalnix
Fabien
jasonbcox
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Commits
rSTAGING677f3d051472: Bump wallet version for pre split keypool
rABC677f3d051472: Bump wallet version for pre split keypool
Summary

Bump the wallet version to indicate support for the pre split keypool.
Also prevents any wallets from upgrading to versions between HD_SPLIT
and PRE_SPLIT_KEYPOOL.

Partial backport of Core PR12560 (4/4)
https://github.com/bitcoin/bitcoin/pull/12560/commits/a8da482a8bc87ff26194612727d4a7b86b2fb60d

Depends on D4206

Test Plan

Using a wallet from before v0.19.7:

make check
./bitcoind -printtoconsole -upgradewallet=190700
./bitcoin-cli getwalletinfo

Above should output something like:

{
   "walletname": "",
   "walletversion": 200300,
   "balance": 0.00000000,
   "unconfirmed_balance": 0.00000000,
   "immature_balance": 0.00000000,
   "txcount": 0,
   "keypoololdest": 1570130795,
   "keypoolsize": 2000,
   "keypoolsize_hd_internal": 0,
   "paytxfee": 0.00000000,
   "hdmasterkeyid": "0a6b7ba8344e7f65abca305956e696c2b2d4023a"
}

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Owners added a reviewer: Restricted Owners Package.Oct 3 2019, 19:34

Considering the error message, I would prefer that this is merged with D4206. Landing immediately after is acceptable as long as the diffs don't cross release boundaries, but why risk it in the first place?

This revision is now accepted and ready to land.Oct 4 2019, 21:57

Considering the error message, I would prefer that this is merged with D4206. Landing immediately after is acceptable as long as the diffs don't cross release boundaries, but why risk it in the first place?

It was mainly for testing purposes and making the review process easier. I am not opposed to squashing the two together as this stack was originally one large diff that seemed like it would be difficult to review.