diff options
author | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-11-11 00:40:11 +0000 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2019-11-11 22:32:44 +0000 |
commit | a5e77959c8ff6a8bffa1621d7ea29ee8603c5a14 (patch) | |
tree | 3d9b21654f65add933b2afdf1ced509b1ec3252c /test/functional/wallet_listtransactions.py | |
parent | 89e93135aedf984f7a98771f047e2beb6cdbdb8e (diff) |
rpc: Expose block height of wallet transactions
Diffstat (limited to 'test/functional/wallet_listtransactions.py')
-rwxr-xr-x | test/functional/wallet_listtransactions.py | 7 |
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) |