def broadcast_batch_by_batch_id_request(self, batch_id): # Need to define node identity to be able to route directly back batch_request = GossipBatchByBatchIdRequest(id=batch_id, nonce=binascii.b2a_hex( os.urandom(16))) self.broadcast(batch_request, validator_pb2.Message.GOSSIP_BATCH_BY_BATCH_ID_REQUEST)
def broadcast_batch_by_batch_id_request(self, batch_id): time_to_live = self.get_time_to_live() batch_request = GossipBatchByBatchIdRequest(id=batch_id, nonce=binascii.b2a_hex( os.urandom(16)), time_to_live=time_to_live) self.broadcast(batch_request, validator_pb2.Message.GOSSIP_BATCH_BY_BATCH_ID_REQUEST)