Skip to content

Commit e155bd9

Browse files
committed
test: add a case for upgradetohd with null characters in mnemonic passphrase
1 parent 88231b1 commit e155bd9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/functional/wallet_upgradetohd.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,14 @@ def run_test(self):
247247
assert_equal(12, w12.getbalance())
248248
w12.unloadwallet()
249249

250+
self.log.info("Test upgradetohd with null characters in mnemonic passphrase")
251+
# Null characters aren't allowed in mnemonic passphrases, the first one and everything after it is ignored
252+
node.createwallet("wallet-13", blank=True)
253+
w13 = node.get_wallet_rpc("wallet-13")
254+
w13.upgradetohd(custom_mnemonic, "custom-passphrase\0with\0null\0characters")
255+
assert_equal(12, w13.getbalance())
256+
w13.unloadwallet()
257+
250258

251259
if __name__ == '__main__':
252260
WalletUpgradeToHDTest().main ()

0 commit comments

Comments
 (0)