Skip to content

Commit b6aa926

Browse files
committed
don't increment next index for nonce
1 parent 161692b commit b6aa926

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

bittensor/core/extrinsics/async_weights.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ async def _do_set_weights(
5959
},
6060
)
6161

62-
next_nonce = (
63-
await subtensor.substrate.get_account_next_index(wallet.hotkey.ss58_address) + 1
62+
next_nonce = await subtensor.substrate.get_account_next_index(
63+
wallet.hotkey.ss58_address
6464
)
6565

6666
# Period dictates how long the extrinsic will stay as part of waiting pool
@@ -193,8 +193,8 @@ async def _do_commit_weights(
193193
},
194194
)
195195

196-
next_nonce = (
197-
await subtensor.substrate.get_account_next_index(wallet.hotkey.ss58_address) + 1
196+
next_nonce = await subtensor.substrate.get_account_next_index(
197+
wallet.hotkey.ss58_address
198198
)
199199

200200
extrinsic = await subtensor.substrate.create_signed_extrinsic(

bittensor/core/extrinsics/commit_weights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def do_commit_weights(
6666
"commit_hash": commit_hash,
6767
},
6868
)
69-
next_nonce = self.get_account_next_index(wallet.hotkey.ss58_address) + 1
69+
next_nonce = self.get_account_next_index(wallet.hotkey.ss58_address)
7070
extrinsic = self.substrate.create_signed_extrinsic(
7171
call=call,
7272
keypair=wallet.hotkey,

bittensor/core/extrinsics/set_weights.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def do_set_weights(
7676
"version_key": version_key,
7777
},
7878
)
79-
next_nonce = self.get_account_next_index(wallet.hotkey.ss58_address) + 1
79+
next_nonce = self.get_account_next_index(wallet.hotkey.ss58_address)
8080
# Period dictates how long the extrinsic will stay as part of waiting pool
8181
extrinsic = self.substrate.create_signed_extrinsic(
8282
call=call,

0 commit comments

Comments
 (0)