File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
bittensor/core/extrinsics/asyncex Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -498,20 +498,24 @@ async def set_subnet_identity_extrinsic(
498
498
},
499
499
)
500
500
501
- success , message = await subtensor .sign_and_send_extrinsic (
501
+ response = await subtensor .substrate . submit_extrinsic (
502
502
call = call ,
503
503
wallet = wallet ,
504
504
wait_for_inclusion = wait_for_inclusion ,
505
505
wait_for_finalization = wait_for_finalization ,
506
506
)
507
507
508
- if success :
508
+ if not wait_for_finalization and not wait_for_inclusion :
509
+ return True , f"Identities for subnet { netuid } are sent to the chain."
510
+
511
+ if await response .is_success :
509
512
logging .success (
510
513
f":white_heavy_check_mark: [green]Identities for subnet[/green] [blue]{ netuid } [/blue] [green]are set.[/green]"
511
514
)
512
515
return True , f"Identities for subnet { netuid } are set."
513
516
else :
517
+ error_message = await response .error_message
514
518
logging .error (
515
- f":cross_mark: Failed to set identity for subnet [blue]{ netuid } [/blue]: { message } "
519
+ f":cross_mark: Failed to set identity for subnet [blue]{ netuid } [/blue]: { error_message } "
516
520
)
517
- return False , f"Failed to set identity for subnet { netuid } : { message } "
521
+ return False , f"Failed to set identity for subnet { netuid } : { error_message } "
You can’t perform that action at this time.
0 commit comments