Changeset View
Changeset View
Standalone View
Standalone View
test/functional/p2p_blocksonly.py
Show All 9 Lines | |||||
from test_framework.util import assert_equal | from test_framework.util import assert_equal | ||||
class P2PBlocksOnly(BitcoinTestFramework): | class P2PBlocksOnly(BitcoinTestFramework): | ||||
def set_test_params(self): | def set_test_params(self): | ||||
self.setup_clean_chain = False | self.setup_clean_chain = False | ||||
self.num_nodes = 1 | self.num_nodes = 1 | ||||
self.extra_args = [["-blocksonly"]] | self.extra_args = [["-blocksonly"]] | ||||
self.supports_cli = False | |||||
def run_test(self): | def run_test(self): | ||||
self.nodes[0].add_p2p_connection(P2PInterface()) | self.nodes[0].add_p2p_connection(P2PInterface()) | ||||
self.log.info( | self.log.info( | ||||
'Check that txs from p2p are rejected and result in disconnect') | 'Check that txs from p2p are rejected and result in disconnect') | ||||
prevtx = self.nodes[0].getblock( | prevtx = self.nodes[0].getblock( | ||||
self.nodes[0].getblockhash(1), 2)['tx'][0] | self.nodes[0].getblockhash(1), 2)['tx'][0] | ||||
▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines |