[wallet] Rename 'decode' argument in gettransaction method to 'verbose'

This makes the RPC method consistent with other RPC methods that have a
'verbose' option.

Change the name of the return object from 'decoded' to details.

Update help text.
This commit is contained in:
John Newbery
2019-09-13 22:31:11 +03:00
parent fb4f5beb6e
commit 7dee8f4808
4 changed files with 14 additions and 14 deletions

View File

@@ -499,10 +499,10 @@ 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"]))
# Test "verbose" field value in gettransaction response
self.log.info("Testing verbose gettransaction...")
tx = self.nodes[0].gettransaction(txid=txid, verbose=True)
assert_equal(tx["details"], self.nodes[0].decoderawtransaction(tx["hex"]))
if __name__ == '__main__':