Skip to content

Commit 28a77a5

Browse files
committed
Removes limits in async + unstake_mul
1 parent 0f8d278 commit 28a77a5

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

bittensor/core/extrinsics/asyncex/staking.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -314,20 +314,6 @@ async def add_stake_multiple_extrinsic(
314314
if staking_response is True: # If we successfully staked.
315315
# We only wait here if we expect finalization.
316316

317-
if idx < len(hotkey_ss58s) - 1:
318-
# Wait for tx rate limit.
319-
tx_query = await subtensor.substrate.query(
320-
module="SubtensorModule", storage_function="TxRateLimit"
321-
)
322-
tx_rate_limit_blocks: int = getattr(tx_query, "value", 0)
323-
if tx_rate_limit_blocks > 0:
324-
logging.error(
325-
f":hourglass: [yellow]Waiting for tx rate limit: [white]{tx_rate_limit_blocks}[/white] "
326-
f"blocks[/yellow]"
327-
)
328-
# 12 seconds per block
329-
await asyncio.sleep(tx_rate_limit_blocks * 12)
330-
331317
if not wait_for_finalization and not wait_for_inclusion:
332318
old_balance -= staking_balance
333319
successful_stakes += 1

bittensor/core/extrinsics/asyncex/unstaking.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,6 @@ async def unstake_multiple_extrinsic(
281281
if staking_response is True: # If we successfully unstaked.
282282
# We only wait here if we expect finalization.
283283

284-
if idx < len(hotkey_ss58s) - 1:
285-
# Wait for tx rate limit.
286-
tx_rate_limit_blocks = await subtensor.tx_rate_limit()
287-
if tx_rate_limit_blocks > 0:
288-
logging.info(
289-
f":hourglass: [yellow]Waiting for tx rate limit: "
290-
f"[white]{tx_rate_limit_blocks}[/white] blocks[/yellow]"
291-
)
292-
await asyncio.sleep(
293-
tx_rate_limit_blocks * 12
294-
) # 12 seconds per block
295-
296284
if not wait_for_finalization and not wait_for_inclusion:
297285
successful_unstakes += 1
298286
continue

bittensor/core/extrinsics/unstaking.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -266,16 +266,6 @@ def unstake_multiple_extrinsic(
266266
if staking_response is True: # If we successfully unstaked.
267267
# We only wait here if we expect finalization.
268268

269-
if idx < len(hotkey_ss58s) - 1:
270-
# Wait for tx rate limit.
271-
tx_rate_limit_blocks = subtensor.tx_rate_limit()
272-
if tx_rate_limit_blocks > 0:
273-
logging.info(
274-
f":hourglass: [yellow]Waiting for tx rate limit: "
275-
f"[white]{tx_rate_limit_blocks}[/white] blocks[/yellow]"
276-
)
277-
time.sleep(tx_rate_limit_blocks * 12) # 12 seconds per block
278-
279269
if not wait_for_finalization and not wait_for_inclusion:
280270
successful_unstakes += 1
281271
continue

0 commit comments

Comments
 (0)