def METHOD_NAME(self):
    # Setup the p2p connection and start up the network thread.
    test_node = TestNode()
    connections = []
    connections.append(NodeConn('127.0.0.1', p2p_port(0), self.nodes[0], test_node))
    test_node.add_connection(connections[0])
    NetworkThread().start() # Start up network handling in another thread
    # Test logic begins here
    test_node.wait_for_verack()
    # 1. Have the node mine one period worth of blocks
    self.nodes[0].generate(VB_PERIOD)
    # 2. Now build one period of blocks on the tip, with < VB_THRESHOLD
    # blocks signaling some unknown bit.
    nVersion = VB_TOP_BITS | (1<<VB_UNKNOWN_BIT)
    self.send_blocks_with_version(test_node, VB_THRESHOLD-1, nVersion)
    # Fill rest of period with regular version blocks
    self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD + 1)
    # Check that we're not getting any versionbit-related errors in
    # get*info()
    assert(not VB_PATTERN.match(self.nodes[0].getinfo()["errors"]))
    assert(not VB_PATTERN.match(self.nodes[0].getmininginfo()["errors"]))
    assert(not VB_PATTERN.match(self.nodes[0].getnetworkinfo()["warnings"]))
    # 3. Now build one period of blocks with >= VB_THRESHOLD blocks signaling
    # some unknown bit
    self.send_blocks_with_version(test_node, VB_THRESHOLD, nVersion)
    self.nodes[0].generate(VB_PERIOD - VB_THRESHOLD)
    # Might not get a versionbits-related alert yet, as we should
    # have gotten a different alert due to more than 51/100 blocks
    # being of unexpected version.
    # Check that get*info() shows some kind of error.
    assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getinfo()["errors"])
    assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getmininginfo()["errors"])
    assert(WARN_UNKNOWN_RULES_MINED in self.nodes[0].getnetworkinfo()["warnings"])
    # Mine a period worth of expected blocks so the generic block-version warning
    # is cleared, and restart the node. This should move the versionbit state
    # to ACTIVE.
    self.nodes[0].generate(VB_PERIOD)
    stop_nodes(self.nodes)
    # Empty out the alert file
    with open(self.alert_filename, 'w', encoding='utf8') as _:
        pass
    self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)
    # Connecting one block should be enough to generate an error.
    self.nodes[0].generate(1)
    assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getinfo()["errors"])
    assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getmininginfo()["errors"])
    assert(WARN_UNKNOWN_RULES_ACTIVE in self.nodes[0].getnetworkinfo()["warnings"])
    stop_nodes(self.nodes)
    self.test_versionbits_in_alert_file()
    # Test framework expects the node to still be running...
    self.nodes = start_nodes(self.num_nodes, self.options.tmpdir, self.extra_args)