def METHOD_NAME(self):
    for i in range(4):
        self.mine_quorum()
    # mine single block, wait for chainlock
    self.nodes[0].generate(1)
    self.wait_for_chainlock_tip_all_nodes()
    # mine many blocks, wait for chainlock
    self.nodes[0].generate(20)
    self.wait_for_chainlock_tip_all_nodes()
    # assert that all blocks up until the tip are chainlocked
    for h in range(1, self.nodes[0].getblockcount()):
        block = self.nodes[0].getblock(self.nodes[0].getblockhash(h))
        assert(block['chainlock'])
    # Isolate node, mine on another, and reconnect
    isolate_node(self.nodes[0])
    node0_tip = self.nodes[0].getbestblockhash()
    self.nodes[1].generate(5)
    self.wait_for_chainlock_tip(self.nodes[1])
    assert(self.nodes[0].getbestblockhash() == node0_tip)
    reconnect_isolated_node(self.nodes[0], 1)
    self.nodes[1].generate(1)
    self.wait_for_chainlock(self.nodes[0], self.nodes[1].getbestblockhash())
    # Isolate node, mine on both parts of the network, and reconnect
    isolate_node(self.nodes[0])
    self.nodes[0].generate(5)
    self.nodes[1].generate(1)
    good_tip = self.nodes[1].getbestblockhash()
    self.wait_for_chainlock_tip(self.nodes[1])
    assert(not self.nodes[0].getblock(self.nodes[0].getbestblockhash())["chainlock"])
    reconnect_isolated_node(self.nodes[0], 1)
    self.nodes[1].generate(1)
    self.wait_for_chainlock(self.nodes[0], self.nodes[1].getbestblockhash())
    assert(self.nodes[0].getblock(self.nodes[0].getbestblockhash())["previousblockhash"] == good_tip)
    assert(self.nodes[1].getblock(self.nodes[1].getbestblockhash())["previousblockhash"] == good_tip)
    # Keep node connected and let it try to reorg the chain
    good_tip = self.nodes[0].getbestblockhash()
    # Restart it so that it forgets all the chainlocks from the past
    stop_node(self.nodes[0], 0)
    self.nodes[0] = start_node(0, self.options.tmpdir, self.extra_args[0])
    connect_nodes(self.nodes[0], 1)
    self.nodes[0].invalidateblock(self.nodes[0].getbestblockhash())
    # Now try to reorg the chain
    self.nodes[0].generate(2)
    assert(self.nodes[1].getbestblockhash() == good_tip)
    self.nodes[0].generate(2)
    sleep(6)
    assert(self.nodes[1].getbestblockhash() == good_tip)
    # Now let the node which is on the wrong chain reorg back to the locked chain
    self.nodes[0].reconsiderblock(good_tip)
    assert(self.nodes[0].getbestblockhash() != good_tip)
    self.nodes[1].generate(1)
    self.wait_for_chainlock(self.nodes[0], self.nodes[1].getbestblockhash())
    assert(self.nodes[0].getbestblockhash() == self.nodes[1].getbestblockhash())
    isolate_node(self.nodes[0])
    self.nodes[0].generate(1)
    reconnect_isolated_node(self.nodes[0], 1)
    self.wait_for_chainlock(self.nodes[0], self.nodes[1].getbestblockhash())