Page MenuHomePhabricator

wallet: Display non-HD error on first run
ClosedPublic

Authored by Fabien on May 29 2019, 19:30.

Details

Summary
On current master a fresh wallet created with -usehd=0 is silently
created as HD wallet.
An error should be displayed on the first run.

Also, this restores a test that was removed in c22a53c

Fixes: #11313

Backport of core PR11307
https://github.com/bitcoin/bitcoin/pull/11307/files

Test Plan
./test/functional/test_runner.py wallet_hd

mkdir /tmp/wallet
./src/bitcoind -walletdir=/tmp/wallet -usehd=0

Should return an init error:

Error: Error creating : You can't create non-HD wallets with this
version.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
PR11307
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 6050
Build 10159: Bitcoin ABC Buildbot (legacy)
Build 10158: arc lint + arc unit

Event Timeline

src/wallet/wallet.cpp
4316

You may notice that the error belongs to the above case. This is a mistake which is fixed by the removal in this diff.

This revision is now accepted and ready to land.May 29 2019, 20:41