Skip to content

Commit

Permalink
add nonce to root set weights
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-opentensor committed Jan 10, 2025
1 parent c31520e commit 6b8776e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bittensor/core/extrinsics/asyncex/root.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,17 @@ async def _do_set_root_weights(
"hotkey": wallet.hotkey.ss58_address,
},
)

next_nonce = await subtensor.substrate.get_account_next_index(
wallet.hotkey.ss58_address
)

# Period dictates how long the extrinsic will stay as part of waiting pool
extrinsic = await subtensor.substrate.create_signed_extrinsic(
call=call,
keypair=wallet.coldkey,
era={"period": period},
nonce=next_nonce,
)
response = await subtensor.substrate.submit_extrinsic(
extrinsic=extrinsic,
Expand Down

0 comments on commit 6b8776e

Please sign in to comment.