Skip to content

Commit f009d65

Browse files
authored
Fix of the weights commands (#13)
1 parent ed0af34 commit f009d65

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

cli.py

+2
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ def __init__(self):
284284
self.wallet_app.command("set-identity")(self.wallet_set_id)
285285
self.wallet_app.command("get-identity")(self.wallet_get_id)
286286
self.wallet_app.command("check-swap")(self.wallet_check_ck_swap)
287+
self.wallet_app.command("sign")(self.wallet_sign)
287288

288289
# root commands
289290
self.root_app.command("list")(self.root_list)
@@ -324,6 +325,7 @@ def __init__(self):
324325

325326
# weights commands
326327
self.weights_app.command("reveal")(self.weights_reveal)
328+
self.weights_app.command("commit")(self.weights_commit)
327329

328330
def initialize_chain(
329331
self,

src/commands/weights.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,10 @@ async def _commit_reveal(
196196
)
197197

198198
# Attempt executing reveal function after a delay of 'interval'
199+
await self.subtensor.substrate.close()
199200
await asyncio.sleep(interval)
200-
return await self.reveal(weight_uids, weight_vals)
201+
async with self.subtensor:
202+
return await self.reveal(weight_uids, weight_vals)
201203
else:
202204
console.print(f":cross_mark: [red]Failed[/red]: error:{commit_msg}")
203205
# bittensor.logging.error(msg=commit_msg, prefix="Set weights with hash commit",

0 commit comments

Comments
 (0)