def test_getblocktxn_response(compact_block, peer, expected_result):
    msg = msg_cmpctblock(compact_block.to_p2p())
    peer.send_and_ping(msg)
    with mininode_lock:
        assert ('getblocktxn' in peer.last_message)
        absolute_indexes = peer.last_message['getblocktxn'].block_txn_request.to_absolute()
    assert_equal(absolute_indexes, expected_result)
def test_getblocktxn_response(compact_block, peer, expected_result):
    msg = msg_cmpctblock(compact_block.to_p2p())
    peer.send_and_ping(msg)
    with mininode_lock:
        assert ('getblocktxn' in peer.last_message)
        absolute_indexes = peer.last_message['getblocktxn'].block_txn_request.to_absolute()
    assert_equal(absolute_indexes, expected_result)