14 Test version bits' warning system. 16 Generate chains with block versions that appear to be signalling unknown 17 soft-forks, and test that warning alerts are generated. 22 VB_TOP_BITS = 0x20000000
29 NodeConnCB.__init__(self)
52 while not received_pong
and timeout > 0:
53 time.sleep(sleep_time)
85 for i
in xrange(numblocks):
87 block.nVersion = nVersionToUse
106 test_node.add_connection(connections[0])
111 test_node.wait_for_verack()
118 nVersion = VB_TOP_BITS | (1<<VB_UNKNOWN_BIT)
146 self.
nodes[0] =
start_node(0, self.options.tmpdir, [
"-debug",
"-logtimemicros=1",
"-alertnotify=echo %s >> \"" + self.
alert_filename +
"\""])
156 self.
nodes[0] =
start_node(0, self.options.tmpdir, [
"-debug",
"-logtimemicros=1",
"-alertnotify=echo %s >> \"" + self.
alert_filename +
"\""])
159 if __name__ ==
'__main__':
UniValue getblockheader(const UniValue ¶ms, bool fHelp)
def send_message(self, message)
def sync_with_ping(self, timeout=30)
def add_connection(self, conn)
UniValue getblockcount(const UniValue ¶ms, bool fHelp)
def initialize_chain_clean(test_dir, num_nodes)
UniValue getinfo(const UniValue ¶ms, bool fHelp)
def test_versionbits_in_alert_file(self)
def start_node(i, dirname, extra_args=None, rpchost=None, timewait=None, binary=None)
UniValue generate(const UniValue ¶ms, bool fHelp)
UniValue getbestblockhash(const UniValue ¶ms, bool fHelp)
def on_pong(self, conn, message)
def on_inv(self, conn, message)
def send_blocks_with_version(self, peer, numblocks, nVersionToUse)