Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_nobloomfilter_messages.py
#!/usr/bin/env python3 | #!/usr/bin/env python3 | ||||
# Copyright (c) 2015-2018 The Bitcoin Core developers | # Copyright (c) 2015-2018 The Bitcoin Core developers | ||||
# Distributed under the MIT software license, see the accompanying | # Distributed under the MIT software license, see the accompanying | ||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | # file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
"""Test invalid p2p messages for nodes with bloom filters disabled. | """Test invalid p2p messages for nodes with bloom filters disabled. | ||||
Test that, when bloom filters are not enabled, peers are disconnected if: | Test that, when bloom filters are not enabled, peers are disconnected if: | ||||
1. They send a p2p mempool message | 1. They send a p2p mempool message | ||||
2. They send a p2p filterload message | 2. They send a p2p filterload message | ||||
3. They send a p2p filteradd message | 3. They send a p2p filteradd message | ||||
4. They send a p2p filterclear message | 4. They send a p2p filterclear message | ||||
""" | """ | ||||
from test_framework.messages import msg_mempool, msg_filteradd, msg_filterload, msg_filterclear | from test_framework.messages import ( | ||||
msg_filteradd, | |||||
msg_filterclear, | |||||
msg_filterload, | |||||
msg_mempool, | |||||
) | |||||
from test_framework.p2p import P2PInterface | from test_framework.p2p import P2PInterface | ||||
from test_framework.test_framework import BitcoinTestFramework | from test_framework.test_framework import BitcoinTestFramework | ||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class P2PNoBloomFilterMessages(BitcoinTestFramework): | class P2PNoBloomFilterMessages(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = True | self.setup_clean_chain = True | ||||
Show All 30 Lines |