def METHOD_NAME(self):
    self.log.info("Check that a transaction in the last block is uploaded (beneficial for compact block relay)")
    inbound_peer = self.gen_node.add_p2p_connection(P2PNode())
    self.log.debug("Generate transaction and block")
    inbound_peer.last_message.pop("inv", None)
    wtxid = self.miniwallet.send_self_transfer(from_node=self.gen_node)["wtxid"]
    inbound_peer.wait_until(lambda: "inv" in inbound_peer.last_message and inbound_peer.last_message.get("inv").inv[0].hash == int(wtxid, 16))
    want_tx = msg_getdata(inv=inbound_peer.last_message.get("inv").inv)
    self.generate(self.gen_node, 1)
    self.log.debug("Request transaction")
    inbound_peer.last_message.pop("tx", None)
    inbound_peer.send_and_ping(want_tx)
    assert_equal(inbound_peer.last_message.get("tx").tx.getwtxid(), wtxid)