Add a new requirement that `importprivkey` API is idempotent.
This commit is contained in:
parent
d187317083
commit
3e92c028ce
|
@ -97,6 +97,10 @@ class KeyImportExportTest (BitcoinTestFramework):
|
||||||
ipkaddr = charlie.importprivkey(privkey, '', True)
|
ipkaddr = charlie.importprivkey(privkey, '', True)
|
||||||
assert_equal(addr, ipkaddr)
|
assert_equal(addr, ipkaddr)
|
||||||
|
|
||||||
|
# Verify idempotent behavior:
|
||||||
|
ipkaddr2 = charlie.importprivkey(privkey, '', True)
|
||||||
|
assert_equal(addr, ipkaddr2)
|
||||||
|
|
||||||
# importprivkey should have rescanned, so this should pass:
|
# importprivkey should have rescanned, so this should pass:
|
||||||
verify_utxos(charlie, amounts[:4])
|
verify_utxos(charlie, amounts[:4])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue