From aed60ed8e1be06f00439aa7ada3e860472d10419 Mon Sep 17 00:00:00 2001 From: ijanus Date: Thu, 28 Dec 2023 09:02:21 +0100 Subject: [PATCH] Updated to reflect bitcoin version --- test/functional/feature_anchors.py | 7 ++++--- test/functional/test_framework/blocktools.py | 4 ---- test/functional/test_framework/messages.py | 12 +++++++++++- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/test/functional/feature_anchors.py b/test/functional/feature_anchors.py index 0c4c217650..e739951848 100755 --- a/test/functional/feature_anchors.py +++ b/test/functional/feature_anchors.py @@ -64,14 +64,15 @@ def run_test(self): self.log.info("Check the addresses in anchors.dat") with open(node_anchors_path, "rb") as file_handler: - anchors = file_handler.read().hex() + anchors = file_handler.read() + anchors_hex = anchors.hex() for port in block_relay_nodes_port: ip_port = ip + port - assert ip_port in anchors + assert ip_port in anchors_hex for port in inbound_nodes_port: ip_port = ip + port - assert ip_port not in anchors + assert ip_port not in anchors_hex self.log.info("Perturb anchors.dat to test it doesn't throw an error during initialization") with self.nodes[0].assert_debug_log(["0 block-relay-only anchors will be tried for connections."]): diff --git a/test/functional/test_framework/blocktools.py b/test/functional/test_framework/blocktools.py index aa2c414713..8b54015616 100644 --- a/test/functional/test_framework/blocktools.py +++ b/test/functional/test_framework/blocktools.py @@ -43,10 +43,6 @@ keys_to_multisig_script, script_to_p2wsh_script, ) -from .script_util import ( - key_to_p2wpkh_script, - script_to_p2wsh_script, -) from .util import assert_equal WITNESS_SCALE_FACTOR = 4 diff --git a/test/functional/test_framework/messages.py b/test/functional/test_framework/messages.py index ecfa67dd65..5a3e0016cb 100755 --- a/test/functional/test_framework/messages.py +++ b/test/functional/test_framework/messages.py @@ -70,9 +70,19 @@ WITNESS_SCALE_FACTOR = 4 +DEFAULT_ANCESTOR_LIMIT = 25 # default max number of in-mempool ancestors +DEFAULT_DESCENDANT_LIMIT = 25 # default max number of in-mempool descendants + +# Default setting for -datacarriersize. 80 bytes of data, +1 for OP_RETURN, +2 for the pushdata opcodes. +MAX_OP_RETURN_RELAY = 83 + +DEFAULT_MEMPOOL_EXPIRY_HOURS = 336 # hours + # Serialization/deserialization tools def keccak256(s): - h = sha3.keccak_256() + from sha3 import keccak_256 + #print(dir(sha3)) + h = keccak_256() h.update(s) return h.digest()