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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

src/wallet/wallet.cpp
4316 ↗(On Diff #8986)

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