wallet: Display non-HD error on first run

This commit is contained in:
MarcoFalke
2017-09-12 12:44:23 +02:00
parent b9bceaf1c0
commit fadf31ef02
3 changed files with 12 additions and 4 deletions

View File

@@ -20,6 +20,12 @@ class WalletHDTest(BitcoinTestFramework):
def run_test (self):
tmpdir = self.options.tmpdir
# Make sure can't switch off usehd after wallet creation
self.stop_node(1)
self.assert_start_raises_init_error(1, ['-usehd=0'], 'already existing HD wallet')
self.start_node(1)
connect_nodes_bi(self.nodes, 0, 1)
# Make sure we use hd, keep masterkeyid
masterkeyid = self.nodes[1].getwalletinfo()['hdmasterkeyid']
assert_equal(len(masterkeyid), 40)