tests: Add a new functional test for gettransaction

This commit is contained in:
darosior 2019-06-13 00:11:27 +02:00
parent 7f3bb247a8
commit b8b3f0435a
No known key found for this signature in database
GPG key ID: E13FC145CD3F4304

View file

@ -499,6 +499,11 @@ class WalletTest(BitcoinTestFramework):
self.nodes[0].setlabel(change, 'foobar')
assert_equal(self.nodes[0].getaddressinfo(change)['ischange'], False)
# Test "decoded" field value in gettransaction response
self.log.info("Testing gettransaction decoding...")
tx = self.nodes[0].gettransaction(txid=txid, decode=True)
assert_equal(tx["decoded"], self.nodes[0].decoderawtransaction(tx["hex"]))
if __name__ == '__main__':
WalletTest().main()