mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Add test to check new importmulti "now" value
Easiest way to test this was to expose the timestamp via the validateaddress RPC (which was already looking up and returning key metadata).
This commit is contained in:
@@ -139,6 +139,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
||||
# Address + Private key + !watchonly
|
||||
print("Should import an address with private key")
|
||||
address = self.nodes[0].validateaddress(self.nodes[0].getnewaddress())
|
||||
timestamp = self.nodes[1].getblock(self.nodes[1].getbestblockhash())['time']
|
||||
result = self.nodes[1].importmulti([{
|
||||
"scriptPubKey": {
|
||||
"address": address['address']
|
||||
@@ -150,6 +151,7 @@ class ImportMultiTest (BitcoinTestFramework):
|
||||
address_assert = self.nodes[1].validateaddress(address['address'])
|
||||
assert_equal(address_assert['iswatchonly'], False)
|
||||
assert_equal(address_assert['ismine'], True)
|
||||
assert_equal(address_assert['timestamp'], timestamp)
|
||||
|
||||
# Address + Private key + watchonly
|
||||
print("Should not import an address with private key and with watchonly")
|
||||
|
||||
Reference in New Issue
Block a user