p2p_blockfilters
as mentioned in #19070#pullrequestreview-424449204. While here, optionally test with tighter extra_args
, change an info
log to debug
as it doesn’t describe a test, and fix up the message names in the header docstring.
p2p_blockfilters
as mentioned in #19070#pullrequestreview-424449204. While here, optionally test with tighter extra_args
, change an info
log to debug
as it doesn’t describe a test, and fix up the message names in the header docstring.
- add tests for BIP157 configuration options
- test with tighter extra args
- fixup the message names
- change a log message from info to debug
86@@ -79,7 +87,7 @@ def run_test(self):
87 assert int(self.nodes[0].getnetworkinfo()['localservices'], 16) & NODE_COMPACT_FILTERS != 0
88 assert int(self.nodes[1].getnetworkinfo()['localservices'], 16) & NODE_COMPACT_FILTERS == 0
89
90- self.log.info("get cfcheckpt on chain to be re-orged out.")
91+ self.log.debug("get cfcheckpt on chain to be re-orged out.")
Nit: Would it also make sense to make the following changes below?
59+ err_msg = 'Error: Cannot set -peerblockfilters without -blockfilterindex.'
60+ self.nodes[0].assert_start_raises_init_error(['-blockfilterindex=0', '-peerblockfilters'], err_msg)
61+
62+ self.log.info('Test passing unknown -blockfilterindex type raises init error')
63+ err_msg = 'Error: Unknown -blockfilterindex value foo.'
64+ self.nodes[0].assert_start_raises_init_error(['-blockfilterindex=foo', '-peerblockfilters'], err_msg)
Just confirming, is it OK to call assert_start_raises_init_error
when the node is already started?
For example, if I pass a valid blockfilterindex
instead,
self.nodes[0].assert_start_raises_init_error(['-blockfilterindex=basic', '-peerblockfilters'], err_msg)
I thought I would get “test failed because node started successfully”.
But instead, I get “test failed because expected error didn’t match”:
AssertionError: [node 0] Expected message "Error: Cannot set -peerblockfilters without -blockfilterindex." does not fully match stderr:
"Error: Cannot obtain a lock on data directory /var/folders/2b/58wl974967710d36y5sb2_440000gn/T/bitcoin_func_test_zz7jcluz/node0/regtest. Bitcoin Core is probably already running."
test/functional/README.md
, Avoid stop-starting the nodes multiple times during the test if possible. A stop-start takes several seconds, so doing it several times blows up the runtime of the test.