aboutsummaryrefslogtreecommitdiff
path: root/qa
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2017-02-06 11:13:05 -0500
committerRussell Yanofsky <russ@yanofsky.org>2017-02-10 15:40:28 -0500
commit3cf991756cf357b651c6415e3d950e5aa9d355ab (patch)
treef38afae8fed8244798b0e85eb7d64e24a8a2ed01 /qa
parent442887f27fb5809e72862d4385eba86588bc97d0 (diff)
downloadbitcoin-3cf991756cf357b651c6415e3d950e5aa9d355ab.tar.xz
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).
Diffstat (limited to 'qa')
-rwxr-xr-xqa/rpc-tests/importmulti.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/qa/rpc-tests/importmulti.py b/qa/rpc-tests/importmulti.py
index b4d4b6c5b8..b9874ccb85 100755
--- a/qa/rpc-tests/importmulti.py
+++ b/qa/rpc-tests/importmulti.py
@@ -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")