Skip to content

Commit 3d256e7

Browse files
author
Roman
committed
improve async subtensor call
1 parent 5632150 commit 3d256e7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

bittensor/core/async_subtensor.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3812,6 +3812,7 @@ async def set_weights(
38123812
wait_for_inclusion: bool = False,
38133813
wait_for_finalization: bool = False,
38143814
max_retries: int = 5,
3815+
block_time: float = 12.0,
38153816
):
38163817
"""
38173818
Sets the inter-neuronal weights for the specified neuron. This process involves specifying the influence or
@@ -3831,6 +3832,7 @@ async def set_weights(
38313832
wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain. Default is
38323833
``False``.
38333834
max_retries (int): The number of maximum attempts to set weights. Default is ``5``.
3835+
block_time (float): The amount of seconds for block duration. Default is 12.0 seconds.
38343836
38353837
Returns:
38363838
tuple[bool, str]: ``True`` if the setting of weights is successful, False otherwise. And `msg`, a string
@@ -3879,6 +3881,7 @@ async def _blocks_weight_limit() -> bool:
38793881
version_key=version_key,
38803882
wait_for_inclusion=wait_for_inclusion,
38813883
wait_for_finalization=wait_for_finalization,
3884+
block_time=block_time,
38823885
)
38833886
retries += 1
38843887
return success, message

0 commit comments

Comments
 (0)