diff options
author | Gleb Naumenko <naumenko.gs@gmail.com> | 2022-11-14 11:11:52 +0200 |
---|---|---|
committer | Gleb Naumenko <naumenko.gs@gmail.com> | 2022-11-14 11:40:15 +0200 |
commit | ac6ee5ba211d05869800497d6b518ea1ddd2c718 (patch) | |
tree | b02d0814084de4b1f52e2c0c8107fd212f8035e5 /test/functional/p2p_sendtxrcncl.py | |
parent | bc84e24a4f0736919ea4a76f7d45085587625aba (diff) | |
download | bitcoin-ac6ee5ba211d05869800497d6b518ea1ddd2c718.tar.xz |
test: Expand unit and functional tests for txreconciliation
Diffstat (limited to 'test/functional/p2p_sendtxrcncl.py')
-rwxr-xr-x | test/functional/p2p_sendtxrcncl.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/test/functional/p2p_sendtxrcncl.py b/test/functional/p2p_sendtxrcncl.py index dbe6f681d1..8f9e029da4 100755 --- a/test/functional/p2p_sendtxrcncl.py +++ b/test/functional/p2p_sendtxrcncl.py @@ -77,7 +77,7 @@ class SendTxRcnclTest(BitcoinTestFramework): peer.wait_for_verack() verack_index = [i for i, msg in enumerate(peer.messages) if msg.msgtype == b'verack'][0] sendtxrcncl_index = [i for i, msg in enumerate(peer.messages) if msg.msgtype == b'sendtxrcncl'][0] - assert(sendtxrcncl_index < verack_index) + assert sendtxrcncl_index < verack_index self.nodes[0].disconnect_p2ps() self.log.info('SENDTXRCNCL on pre-WTXID version should not be sent') @@ -121,6 +121,14 @@ class SendTxRcnclTest(BitcoinTestFramework): peer.send_message(sendtxrcncl_low_version) peer.wait_for_disconnect() + self.log.info('SENDTXRCNCL with version=2 is valid') + sendtxrcncl_higher_version = create_sendtxrcncl_msg() + sendtxrcncl_higher_version.version = 2 + peer = self.nodes[0].add_p2p_connection(PeerNoVerack(), send_version=True, wait_for_verack=False) + with self.nodes[0].assert_debug_log(['Register peer=6']): + peer.send_message(sendtxrcncl_higher_version) + self.nodes[0].disconnect_p2ps() + self.log.info('sending SENDTXRCNCL after sending VERACK triggers a disconnect') peer = self.nodes[0].add_p2p_connection(P2PInterface()) with self.nodes[0].assert_debug_log(["sendtxrcncl received after verack"]): |