aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgzhao408 <gzhao408@berkeley.edu>2020-06-12 09:30:42 -0700
committergzhao408 <gzhao408@berkeley.edu>2020-06-14 11:47:49 -0700
commitff8c430c6589ea72b9e169455cf6437c8623cc52 (patch)
tree8f227be52d7ad5eae2771b9fd2c51428a4e128d8
parent1c6b787e0319c44f0e0bede3f4a77ac7c2089db2 (diff)
[test] test disconnect for filterclear
-rwxr-xr-xtest/functional/p2p_nobloomfilter_messages.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/functional/p2p_nobloomfilter_messages.py b/test/functional/p2p_nobloomfilter_messages.py
index 41af74ebb8..8478a752e7 100755
--- a/test/functional/p2p_nobloomfilter_messages.py
+++ b/test/functional/p2p_nobloomfilter_messages.py
@@ -8,9 +8,10 @@ Test that, when bloom filters are not enabled, nodes are disconnected if:
1. They send a p2p mempool message
2. They send a p2p filterload message
3. They send a p2p filteradd message
+4. They send a p2p filterclear message
"""
-from test_framework.messages import msg_mempool, msg_filteradd, msg_filterload
+from test_framework.messages import msg_mempool, msg_filteradd, msg_filterload, msg_filterclear
from test_framework.mininode import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import assert_equal
@@ -39,5 +40,8 @@ class P2PNobloomfilterMessages(BitcoinTestFramework):
self.log.info("Test that node is disconnected if it sends filteradd message")
self.test_message_causes_disconnect(msg_filteradd(data=b'\xcc'))
+ self.log.info("Test that peer is disconnected if it sends a filterclear message")
+ self.test_message_causes_disconnect(msg_filterclear())
+
if __name__ == '__main__':
P2PNobloomfilterMessages().main()