hydrachain/consensus/simulation.py
def delay(self, sender, receiver, packet, add_delay=0):
        """
        bandwidths are inaccurate, as we don't account for parallel transfers here
        """
        bw = min(sender.ul_bandwidth, receiver.dl_bandwidth)
        delay = sender.base_latency + receiver.base_latency
        delay += len(packet) / bw
        delay += add_delay
        return delay
def delay(self, sender, receiver, packet, add_delay=0):
        bw = min(sender.ul_bandwidth, receiver.dl_bandwidth)
        delay = sender.base_latency + receiver.base_latency
        delay += len(packet) / bw
        delay += add_delay
        return delay
def delay ( self , sender , receiver , packet , add_delay = 0 ) : bw = min ( sender . ul_bandwidth , receiver . dl_bandwidth ) delay = sender . base_latency + receiver . base_latency delay += len ( packet ) / bw delay += add_delay return delay
bandwidths are inaccurate, as we don't account for parallel transfers here
bandwidths are inaccurate as we don t account for parallel transfers here