functional test fixes

0.21.4
David Burkett 4 weeks ago
parent dab3bb7e1d
commit 7d9fea0cc6

@ -46,7 +46,7 @@ class CompactFiltersTest(BitcoinTestFramework):
self.num_nodes = 2
self.extra_args = [
["-blockfilterindex", "-peerblockfilters", "-vbparams=mweb:-2:0"],
["-blockfilterindex", "-vbparams=mweb:-2:0"],
["-blockfilterindex", "-peerblockfilters=0", "-vbparams=mweb:-2:0"],
]
def run_test(self):

@ -8,7 +8,7 @@ Tests that a node configured with -prune=2200 signals NODE_NETWORK_LIMITED corre
and that it responds to getdata requests for blocks correctly:
- send a block within 288 + 2 of the tip
- disconnect peers who request blocks older than that."""
from test_framework.messages import CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS, NODE_MWEB
from test_framework.messages import NODE_MWEB_LIGHT_CLIENT, CInv, MSG_BLOCK, msg_getdata, msg_verack, NODE_NETWORK_LIMITED, NODE_WITNESS, NODE_MWEB
from test_framework.p2p import P2PInterface
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
@ -35,7 +35,7 @@ class NodeNetworkLimitedTest(BitcoinTestFramework):
def set_test_params(self):
self.setup_clean_chain = True
self.num_nodes = 3
self.extra_args = [['-prune=2200', '-addrmantest'], [], []]
self.extra_args = [['-prune=2200', '-peerblockfilters=0', '-blockfilterindex=0', '-addrmantest'], [], []]
def disconnect_all(self):
self.disconnect_nodes(0, 1)
@ -49,7 +49,7 @@ class NodeNetworkLimitedTest(BitcoinTestFramework):
def run_test(self):
node = self.nodes[0].add_p2p_connection(P2PIgnoreInv())
expected_services = NODE_WITNESS | NODE_MWEB | NODE_NETWORK_LIMITED
expected_services = NODE_WITNESS | NODE_MWEB | NODE_MWEB_LIGHT_CLIENT | NODE_NETWORK_LIMITED
self.log.info("Check that node has signalled expected services.")
assert_equal(node.nServices, expected_services)

@ -54,7 +54,7 @@ class BlockchainTest(BitcoinTestFramework):
def run_test(self):
self.mine_chain()
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1', '-vbparams=mweb:-2:0']) # Set extra args with pruning after rescan is complete
self.restart_node(0, extra_args=['-stopatheight=207', '-prune=1', '-peerblockfilters=0', '-blockfilterindex=0', '-vbparams=mweb:-2:0']) # Set extra args with pruning after rescan is complete
self._test_getblockchaininfo()
self._test_getchaintxstats()
@ -113,7 +113,7 @@ class BlockchainTest(BitcoinTestFramework):
# should have exact keys
assert_equal(sorted(res.keys()), keys)
self.restart_node(0, ['-stopatheight=207', '-prune=2200', '-vbparams=mweb:-2:0'])
self.restart_node(0, ['-stopatheight=207', '-prune=2200', '-peerblockfilters=0', '-blockfilterindex=0', '-vbparams=mweb:-2:0'])
res = self.nodes[0].getblockchaininfo()
# result should have these additional pruning keys if prune=2200
assert_equal(sorted(res.keys()), sorted(['pruneheight', 'automatic_pruning', 'prune_target_size'] + keys))

@ -20,6 +20,7 @@ class RpcMiscTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.supports_cli = False
self.extra_args = [["-blockfilterindex=0", "-peerblockfilters=0"]]
def run_test(self):
node = self.nodes[0]

@ -58,6 +58,7 @@ NODE_BLOOM = (1 << 2)
NODE_WITNESS = (1 << 3)
NODE_COMPACT_FILTERS = (1 << 6)
NODE_NETWORK_LIMITED = (1 << 10)
NODE_MWEB_LIGHT_CLIENT = (1 << 23)
NODE_MWEB = (1 << 24)
MSG_TX = 1

@ -153,7 +153,7 @@ class ImportRescanTest(BitcoinTestFramework):
self.extra_args = [[] for _ in range(self.num_nodes)]
for i, import_node in enumerate(IMPORT_NODES, 2):
if import_node.prune:
self.extra_args[i] += ["-prune=1"]
self.extra_args[i] += ["-prune=1", "-peerblockfilters=0", "-blockfilterindex=0"]
self.add_nodes(self.num_nodes, extra_args=self.extra_args)

Loading…
Cancel
Save