diff options
author | w0xlt <woltx@protonmail.com> | 2022-10-19 16:10:04 -0300 |
---|---|---|
committer | w0xlt <woltx@protonmail.com> | 2022-10-26 01:18:28 -0300 |
commit | eb679a7896ce00e322972a011b023661766923b9 (patch) | |
tree | 88c9a6945c9a227f2890fd487a4a6cd7c302ac22 /test/functional/wallet_listtransactions.py | |
parent | a97791d9fb977cf2a0d19268253238b0fee173f6 (diff) | |
download | bitcoin-eb679a7896ce00e322972a011b023661766923b9.tar.xz |
rpc: make `address` field optional
Diffstat (limited to 'test/functional/wallet_listtransactions.py')
-rwxr-xr-x | test/functional/wallet_listtransactions.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/functional/wallet_listtransactions.py b/test/functional/wallet_listtransactions.py index 7c16b6328d..9bb06774a5 100755 --- a/test/functional/wallet_listtransactions.py +++ b/test/functional/wallet_listtransactions.py @@ -109,6 +109,7 @@ class ListTransactionsTest(BitcoinTestFramework): self.run_rbf_opt_in_test() self.run_externally_generated_address_test() self.run_invalid_parameters_test() + self.test_op_return() def run_rbf_opt_in_test(self): """Test the opt-in-rbf flag for sent and received transactions.""" @@ -284,6 +285,17 @@ class ListTransactionsTest(BitcoinTestFramework): assert_raises_rpc_error(-8, "Negative count", self.nodes[0].listtransactions, count=-1) assert_raises_rpc_error(-8, "Negative from", self.nodes[0].listtransactions, skip=-1) + def test_op_return(self): + """Test if OP_RETURN outputs will be displayed correctly.""" + raw_tx = self.nodes[0].createrawtransaction([], [{'data': 'aa'}]) + funded_tx = self.nodes[0].fundrawtransaction(raw_tx) + signed_tx = self.nodes[0].signrawtransactionwithwallet(funded_tx['hex']) + tx_id = self.nodes[0].sendrawtransaction(signed_tx['hex']) + + op_ret_tx = [tx for tx in self.nodes[0].listtransactions() if tx['txid'] == tx_id][0] + + assert 'address' not in op_ret_tx + if __name__ == '__main__': ListTransactionsTest().main() |