def METHOD_NAME(self):
    print('Testing P2P reorg')
    daemon2 = Daemon(idx = 2)
    daemon3 = Daemon(idx = 3)
    # give sync some time
    time.sleep(1)
    res = daemon2.get_info()
    height = res.height
    assert height > 0
    top_block_hash = res.top_block_hash
    assert len(top_block_hash) == 64
    res = daemon3.get_info()
    assert res.height == height
    assert res.top_block_hash == top_block_hash
    # disconnect daemons and mine separately on both
    daemon2.out_peers(0)
    daemon3.out_peers(0)
    res = daemon2.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 2)
    res = daemon3.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 3)
    res = daemon2.get_info()
    assert res.height == height + 2
    daemon2_top_block_hash = res.top_block_hash
    assert daemon2_top_block_hash != top_block_hash
    res = daemon3.get_info()
    assert res.height == height + 3
    daemon3_top_block_hash = res.top_block_hash
    assert daemon3_top_block_hash != top_block_hash
    assert daemon3_top_block_hash != daemon2_top_block_hash
    # reconnect, daemon2 will now switch to daemon3's chain
    daemon2.out_peers(8)
    daemon3.out_peers(8)
    time.sleep(10)
    res = daemon2.get_info()
    assert res.height == height + 3
    assert res.top_block_hash == daemon3_top_block_hash
    # disconect, mine on daemon2 again more than daemon3
    daemon2.out_peers(0)
    daemon3.out_peers(0)
    res = daemon2.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 3)
    res = daemon3.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 2)
    res = daemon2.get_info()
    assert res.height == height + 6
    daemon2_top_block_hash = res.top_block_hash
    assert daemon2_top_block_hash != top_block_hash
    res = daemon3.get_info()
    assert res.height == height + 5
    daemon3_top_block_hash = res.top_block_hash
    assert daemon3_top_block_hash != top_block_hash
    assert daemon3_top_block_hash != daemon2_top_block_hash
    # reconnect, daemon3 will now switch to daemon2's chain
    daemon2.out_peers(8)
    daemon3.out_peers(8)
    time.sleep(5)
    res = daemon3.get_info()
    assert res.height == height + 6
    assert res.top_block_hash == daemon2_top_block_hash
    # disconnect and mine a lot on daemon3
    daemon2.out_peers(0)
    daemon3.out_peers(0)
    res = daemon3.generateblocks('42ey1afDFnn4886T7196doS9GPMzexD9gXpsZJDwVjeRVdFCSoHnv7KPbBeGpzJBzHRCAs9UxqeoyFQMYbqSWYTfJJQAWDm', 500)
    # reconnect and wait for sync
    daemon2.out_peers(8)
    daemon3.out_peers(8)
    loops = 100
    while True:
        res2 = daemon2.get_info()
        res3 = daemon3.get_info()
        if res2.top_block_hash == res3.top_block_hash:
            break
        time.sleep(10)
        loops -= 1
        assert loops >= 0