bittensor.utils.axon_utils#
Attributes#
Functions#
|
Calculates the allowed window for a nonce in nanoseconds. |
|
Calculates the difference in seconds between the current time and the synapse nonce, |
Module Contents#
- bittensor.utils.axon_utils.ALLOWED_DELTA = 4000000000#
- bittensor.utils.axon_utils.NANOSECONDS_IN_SECOND = 1000000000#
- bittensor.utils.axon_utils.allowed_nonce_window_ns(current_time_ns, synapse_timeout)#
Calculates the allowed window for a nonce in nanoseconds.
- bittensor.utils.axon_utils.calculate_diff_seconds(current_time, synapse_timeout, synapse_nonce)#
Calculates the difference in seconds between the current time and the synapse nonce, and also returns the allowed delta in seconds.
- Parameters:
- Returns:
A tuple containing the difference in seconds (float) and the allowed delta in seconds (float).
- Return type: