mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
[test] test disconnect for filterclear
This commit is contained in:
parent
1c6b787e03
commit
ff8c430c65
1 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Reference in a new issue