diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-04-12 19:46:21 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-04-12 19:46:25 -0400 |
commit | a2b282c9d05843e5729e1a597ab764d912a6343e (patch) | |
tree | b8dfd78f2087d33db8ca031c98d78602fee4e36e | |
parent | 59d62492900f6fc6ade2a780e75863ba3b254e06 (diff) | |
parent | b1b0cfecb639ce44be280c7a45a41a19e893c401 (diff) | |
download | bitcoin-a2b282c9d05843e5729e1a597ab764d912a6343e.tar.xz |
Merge #18609: test: Remove REJECT message code
b1b0cfecb639ce44be280c7a45a41a19e893c401 test: Remove REJECT message code (Hennadii Stepanov)
Pull request description:
We no longer use REJECT p2p message:
- #15437
- #17004
ACKs for top commit:
theStack:
ACK https://github.com/bitcoin/bitcoin/pull/18609/commits/b1b0cfecb639ce44be280c7a45a41a19e893c401 (nice dead code find)
Tree-SHA512: 0a662b282e921c3991aeb15f54d077837f1ef20bc2e3b0b35117bb97a21d1bd1c3e21458e5c18ba0ca02030d559e3e8e74dbd3d3e2b46dbe7bede550948c3b55
-rwxr-xr-x | test/functional/p2p_leak.py | 6 | ||||
-rwxr-xr-x | test/functional/test_framework/mininode.py | 1 |
2 files changed, 1 insertions, 6 deletions
diff --git a/test/functional/p2p_leak.py b/test/functional/p2p_leak.py index 2751ae6a5b..2ecd87748f 100755 --- a/test/functional/p2p_leak.py +++ b/test/functional/p2p_leak.py @@ -4,7 +4,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test message sending before handshake completion. -A node should never send anything other than VERSION/VERACK/REJECT until it's +A node should never send anything other than VERSION/VERACK until it's received a VERACK. This test connects to a node and sends it a few messages, trying to entice it @@ -35,7 +35,6 @@ class CLazyNode(P2PInterface): def on_version(self, message): self.bad_message(message) def on_verack(self, message): self.bad_message(message) - def on_reject(self, message): self.bad_message(message) def on_inv(self, message): self.bad_message(message) def on_addr(self, message): self.bad_message(message) def on_getdata(self, message): self.bad_message(message) @@ -65,8 +64,6 @@ class CNodeNoVersionBan(CLazyNode): for i in range(banscore): self.send_message(msg_verack()) - def on_reject(self, message): pass - # Node that never sends a version. This one just sits idle and hopes to receive # any message (it shouldn't!) class CNodeNoVersionIdle(CLazyNode): @@ -79,7 +76,6 @@ class CNodeNoVerackIdle(CLazyNode): self.version_received = False super().__init__() - def on_reject(self, message): pass def on_verack(self, message): pass # When version is received, don't reply with a verack. Instead, see if the # node will give us a message that it shouldn't. This is not an exhaustive diff --git a/test/functional/test_framework/mininode.py b/test/functional/test_framework/mininode.py index beda7eeaba..9f51bef946 100755 --- a/test/functional/test_framework/mininode.py +++ b/test/functional/test_framework/mininode.py @@ -339,7 +339,6 @@ class P2PInterface(P2PConnection): def on_merkleblock(self, message): pass def on_notfound(self, message): pass def on_pong(self, message): pass - def on_reject(self, message): pass def on_sendcmpct(self, message): pass def on_sendheaders(self, message): pass def on_tx(self, message): pass |