Skip to content

Commit

Permalink
Extend period for fastblock e2e tests_incentive.py
Browse files Browse the repository at this point in the history
  • Loading branch information
opendansor committed Nov 8, 2024
1 parent 892072c commit 17f0452
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bittensor/core/extrinsics/set_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def do_set_weights(
version_key: int = version_as_int,
wait_for_inclusion: bool = False,
wait_for_finalization: bool = False,
period: int = 5,
) -> tuple[bool, Optional[str]]: # (success, error_message)
"""
Internal method to send a transaction to the Bittensor blockchain, setting weights for specified neurons. This method constructs and submits the transaction, handling retries and blockchain communication.
Expand All @@ -58,6 +59,7 @@ def do_set_weights(
version_key (int): Version key for compatibility with the network.
wait_for_inclusion (bool): Waits for the transaction to be included in a block.
wait_for_finalization (bool): Waits for the transaction to be finalized on the blockchain.
period (int): Period dictates how long the extrinsic will stay as part of waiting pool.
Returns:
tuple[bool, Optional[str]]: A tuple containing a success flag and an optional response message.
Expand All @@ -79,7 +81,7 @@ def do_set_weights(
extrinsic = self.substrate.create_signed_extrinsic(
call=call,
keypair=wallet.hotkey,
era={"period": 5},
era={"period": period},
)
response = submit_extrinsic(
substrate=self.substrate,
Expand Down
1 change: 1 addition & 0 deletions tests/e2e_tests/test_incentive.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ async def test_incentive(local_chain):
version_key=0,
wait_for_inclusion=True,
wait_for_finalization=True,
period=25
)
logging.info("Alice neuron set weights successfully")

Expand Down

0 comments on commit 17f0452

Please sign in to comment.