File tree Expand file tree Collapse file tree 3 files changed +0
-37
lines changed
bittensor/core/extrinsics Expand file tree Collapse file tree 3 files changed +0
-37
lines changed Original file line number Diff line number Diff line change @@ -314,20 +314,6 @@ async def add_stake_multiple_extrinsic(
314
314
if staking_response is True : # If we successfully staked.
315
315
# We only wait here if we expect finalization.
316
316
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
-
331
317
if not wait_for_finalization and not wait_for_inclusion :
332
318
old_balance -= staking_balance
333
319
successful_stakes += 1
Original file line number Diff line number Diff line change @@ -281,18 +281,6 @@ async def unstake_multiple_extrinsic(
281
281
if staking_response is True : # If we successfully unstaked.
282
282
# We only wait here if we expect finalization.
283
283
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
-
296
284
if not wait_for_finalization and not wait_for_inclusion :
297
285
successful_unstakes += 1
298
286
continue
Original file line number Diff line number Diff line change 1
- import time
2
1
from typing import Optional , TYPE_CHECKING
3
2
4
3
from bittensor .core .errors import StakeError , NotRegisteredError
@@ -266,16 +265,6 @@ def unstake_multiple_extrinsic(
266
265
if staking_response is True : # If we successfully unstaked.
267
266
# We only wait here if we expect finalization.
268
267
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
-
279
268
if not wait_for_finalization and not wait_for_inclusion :
280
269
successful_unstakes += 1
281
270
continue
You can’t perform that action at this time.
0 commit comments