def on_getdata(self, conn, message):
    [conn.send_message(r) for r in self.block_store.get_blocks(message.inv)]
    [conn.send_message(r) for r in self.tx_store.get_transactions(message.inv)]
    for i in message.inv:
        if (i.type == 1):
            self.tx_request_map[i.hash] = True
        elif (i.type == 2):
            self.block_request_map[i.hash] = True
def on_getdata(self, conn, message):
    [conn.send_message(r) for r in self.block_store.get_blocks(message.inv)]
    [conn.send_message(r) for r in self.tx_store.get_transactions(message.inv)]
    for i in message.inv:
        if (i.type == 1):
            self.tx_request_map[i.hash] = True
        elif (i.type == 2):
            self.block_request_map[i.hash] = True