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_listsinceblock.py | |
parent | a97791d9fb977cf2a0d19268253238b0fee173f6 (diff) | |
download | bitcoin-eb679a7896ce00e322972a011b023661766923b9.tar.xz |
rpc: make `address` field optional
Diffstat (limited to 'test/functional/wallet_listsinceblock.py')
-rwxr-xr-x | test/functional/wallet_listsinceblock.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/functional/wallet_listsinceblock.py b/test/functional/wallet_listsinceblock.py index f259449bef..aff408ceb1 100755 --- a/test/functional/wallet_listsinceblock.py +++ b/test/functional/wallet_listsinceblock.py @@ -45,6 +45,7 @@ class ListSinceBlockTest(BitcoinTestFramework): if self.options.descriptors: self.test_desc() self.test_send_to_self() + self.test_op_return() def test_no_blockhash(self): self.log.info("Test no blockhash") @@ -448,6 +449,19 @@ class ListSinceBlockTest(BitcoinTestFramework): assert any(c["address"] == addr for c in coins) assert all(self.nodes[2].getaddressinfo(c["address"])["ischange"] for c in coins) + def test_op_return(self): + """Test if OP_RETURN outputs will be displayed correctly.""" + block_hash = self.nodes[2].getbestblockhash() + + raw_tx = self.nodes[2].createrawtransaction([], [{'data': 'aa'}]) + funded_tx = self.nodes[2].fundrawtransaction(raw_tx) + signed_tx = self.nodes[2].signrawtransactionwithwallet(funded_tx['hex']) + tx_id = self.nodes[2].sendrawtransaction(signed_tx['hex']) + + op_ret_tx = [tx for tx in self.nodes[2].listsinceblock(blockhash=block_hash)["transactions"] if tx['txid'] == tx_id][0] + + assert 'address' not in op_ret_tx + if __name__ == '__main__': ListSinceBlockTest().main() |