aboutsummaryrefslogtreecommitdiff
path: root/test/functional/wallet_listtransactions.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_listtransactions.py
parent89e93135aedf984f7a98771f047e2beb6cdbdb8e (diff)
downloadbitcoin-a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14.tar.xz
rpc: Expose block height of wallet transactions
Diffstat (limited to 'test/functional/wallet_listtransactions.py')
-rwxr-xr-xtest/functional/wallet_listtransactions.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py
index 997d6e702c..8c44a070b8 100755
--- a/test/functional/wallet_listtransactions.py
+++ b/test/functional/wallet_listtransactions.py
@@ -40,14 +40,15 @@ class ListTransactionsTest(BitcoinTestFramework):
{"txid": txid},
{"category": "receive", "amount": Decimal("0.1"), "confirmations": 0})
# mine a block, confirmations should change:
- self.nodes[0].generate(1)
+ blockhash = self.nodes[0].generate(1)[0]
+ blockheight = self.nodes[0].getblockheader(blockhash)['height']
self.sync_all()
assert_array_result(self.nodes[0].listtransactions(),
{"txid": txid},
- {"category": "send", "amount": Decimal("-0.1"), "confirmations": 1})
+ {"category": "send", "amount": Decimal("-0.1"), "confirmations": 1, "blockhash": blockhash, "blockheight": blockheight})
assert_array_result(self.nodes[1].listtransactions(),
{"txid": txid},
- {"category": "receive", "amount": Decimal("0.1"), "confirmations": 1})
+ {"category": "receive", "amount": Decimal("0.1"), "confirmations": 1, "blockhash": blockhash, "blockheight": blockheight})
# send-to-self:
txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 0.2)