aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_listsinceblock.py
diff options
context:
space:
mode:
authorJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-11-11 00:40:11 +0000
committerJoão Barbosa <joao.paulo.barbosa@gmail.com>2019-11-11 22:32:44 +0000
commita5e77959c8ff6a8bffa1621d7ea29ee8603c5a14 (patch)
tree3d9b21654f65add933b2afdf1ced509b1ec3252c /test/functional/wallet_listsinceblock.py
parent89e93135aedf984f7a98771f047e2beb6cdbdb8e (diff)
downloadbitcoin-a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14.tar.xz
rpc: Expose block height of wallet transactions
Diffstat (limited to 'test/functional/wallet_listsinceblock.py')
-rwxr-xr-xtest/functional/wallet_listsinceblock.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py
index 455e89e310..6f248c9bd3 100755
--- a/test/functional/wallet_listsinceblock.py
+++ b/test/functional/wallet_listsinceblock.py
@@ -40,6 +40,7 @@ class ListSinceBlockTest(BitcoinTestFramework):
def test_no_blockhash(self):
txid = self.nodes[2].sendtoaddress(self.nodes[0].getnewaddress(), 1)
blockhash, = self.nodes[2].generate(1)
+ blockheight = self.nodes[2].getblockheader(blockhash)['height']
self.sync_all()
txs = self.nodes[0].listtransactions()
@@ -47,6 +48,7 @@ class ListSinceBlockTest(BitcoinTestFramework):
"category": "receive",
"amount": 1,
"blockhash": blockhash,
+ "blockheight": blockheight,
"confirmations": 1,
})
assert_equal(
@@ -276,7 +278,8 @@ class ListSinceBlockTest(BitcoinTestFramework):
self.sync_all()
# gettransaction should work for txid1
- self.nodes[0].gettransaction(txid1)
+ tx1 = self.nodes[0].gettransaction(txid1)
+ assert_equal(tx1['blockheight'], self.nodes[0].getblockheader(tx1['blockhash'])['height'])
# listsinceblock(lastblockhash) should now include txid1 in transactions
# as well as in removed