diff --git a/test/functional/p2p-compactblocks.py b/test/functional/p2p-compactblocks.py --- a/test/functional/p2p-compactblocks.py +++ b/test/functional/p2p-compactblocks.py @@ -7,7 +7,7 @@ from test_framework.mininode import * from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * -from test_framework.blocktools import create_block, create_coinbase +from test_framework.blocktools import create_block, create_coinbase, magnetic_anomaly_block from test_framework.script import CScript, OP_TRUE ''' @@ -18,6 +18,10 @@ # TestNode: A peer we use to send messages to bitcoind, and store responses. +# Defer magnetic anomaly until far in the future, so this test can operate +# normally +MAGNETIC_ANOMALY_START_TIME = 2000000000 + class TestNode(NodeConnCB): def __init__(self): @@ -100,7 +104,8 @@ def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 2 - self.extra_args = [[], ["-txindex"]] + self.extra_args = [['-magneticanomalyactivationtime=%d' % MAGNETIC_ANOMALY_START_TIME], + ["-txindex", '-magneticanomalyactivationtime=%d' % MAGNETIC_ANOMALY_START_TIME]] self.utxos = [] def build_block_on_tip(self, node):