@@ -2412,8 +2412,11 @@ def wait_for_block(self, block: Optional[int] = None):
2412
2412
bool: True if the target block was reached, False if timeout occurred.
2413
2413
2414
2414
Example:
2415
- >>> subtensor.wait_for_block() # Waits for the next block
2416
- >>> subtensor.wait_for_block(block=1234) # Waits for a specific block
2415
+ import bittensor as bt
2416
+ subtensor = bt.Subtensor()
2417
+
2418
+ subtensor.wait_for_block() # Waits for the next block
2419
+ subtensor.wait_for_block(block=1234) # Waits for a specific block
2417
2420
"""
2418
2421
2419
2422
def handler (block_data : dict ):
@@ -2431,7 +2434,7 @@ def handler(block_data: dict):
2431
2434
else :
2432
2435
target_block = current_block ["header" ]["number" ] + 1
2433
2436
2434
- self .substrate ._get_block_handler (
2437
+ self .substrate .get_block_handler (
2435
2438
current_block_hash , header_only = True , subscription_handler = handler
2436
2439
)
2437
2440
return True
@@ -3695,7 +3698,7 @@ def unstake(
3695
3698
period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted. If
3696
3699
the transaction is not included in a block within that number of blocks, it will expire and be rejected.
3697
3700
You can think of it as an expiration date for the transaction.
3698
- unstake_all: If true, unstakes all tokens. Default is ``False``.
3701
+ unstake_all: If true, unstakes all tokens. Default is ``False``. If `True` amount is ignored.
3699
3702
3700
3703
Returns:
3701
3704
bool: ``True`` if the unstaking process is successful, False otherwise.
@@ -3747,7 +3750,7 @@ def unstake_multiple(
3747
3750
period (Optional[int]): The number of blocks during which the transaction will remain valid after it's submitted. If
3748
3751
the transaction is not included in a block within that number of blocks, it will expire and be rejected.
3749
3752
You can think of it as an expiration date for the transaction.
3750
- unstake_all: If true, unstakes all tokens. Default is ``False``.
3753
+ unstake_all: If true, unstakes all tokens. Default is ``False``. If `True` amounts are ignored.
3751
3754
3752
3755
Returns:
3753
3756
bool: ``True`` if the batch unstaking is successful, False otherwise.
0 commit comments