Skip to content

Commit 6eac932

Browse files
authored
Merge branch 'staging' into fix/thewhaleking/get-all-commitments-fix
2 parents 313467d + 4ec4618 commit 6eac932

File tree

3 files changed

+0
-37
lines changed

3 files changed

+0
-37
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 & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import time
21
from typing import Optional, TYPE_CHECKING
32

43
from bittensor.core.errors import StakeError, NotRegisteredError
@@ -266,16 +265,6 @@ def unstake_multiple_extrinsic(
266265
if staking_response is True: # If we successfully unstaked.
267266
# We only wait here if we expect finalization.
268267

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-
279268
if not wait_for_finalization and not wait_for_inclusion:
280269
successful_unstakes += 1
281270
continue

0 commit comments

Comments
 (0)