HomePhabricator

test: get and decode tx with a single `gettransaction` RPC call

Description

test: get and decode tx with a single gettransaction RPC call

Summary:

Rather than subsequently calling `gettransaction` and
`decoderawtransaction` to get the decoded information  for a specific tx-id, we can simply use the verbose version of `gettransaction`, which returns this in a 'decoded' key. I.e.

node.decoderawtransaction(node.gettransaction(txid)['hex'])

can be replaced by:

node.gettransaction(txid=txid, verbose=True)['decoded']

Backport of core#23287.

Test Plan:

ninja check-functional

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

Differential Revision: https://reviews.bitcoinabc.org/D12597

Details

Provenance
Sebastian Falbesoner <sebastian.falbesoner@gmail.com>Authored on Oct 15 2021, 14:11
FabienCommitted on Nov 23 2022, 19:05
FabienPushed on Nov 23 2022, 19:05
Reviewer
Restricted Project
Differential Revision
D12597: test: get and decode tx with a single `gettransaction` RPC call
Parents
rABCa71672691af9: Replace struct update_fee_delta with lambda
Branches
Unknown
Tags
Unknown