Skip to content

Commit

Permalink
review comments fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-opentensor committed Nov 5, 2024
1 parent 858f732 commit e50b59b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
10 changes: 9 additions & 1 deletion bittensor/core/extrinsics/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,10 @@ def register_extrinsic(
)
return True

logging.debug(
f"Registration hotkey: <blue>{wallet.hotkey.ss58_address}</blue>, <green>Public</green> coldkey: <blue>{wallet.coldkey.ss58_address}</blue> in the network: <blue>{subtensor.network}</blue>."
)

if not torch:
log_no_torch_error()
return False
Expand Down Expand Up @@ -380,6 +384,10 @@ def burned_register_extrinsic(
return True

logging.info(":satellite: <magenta>Recycling TAO for Registration...</magenta>")

recycle_amount = subtensor.recycle(netuid=netuid)
logging.info(f"Recycling {recycle_amount} to register on subnet:{netuid}")

success, err_msg = _do_burned_register(
self=subtensor,
netuid=netuid,
Expand All @@ -389,7 +397,7 @@ def burned_register_extrinsic(
)

if not success:
logging.error(f":cross_mark: <red>Failed:</red> {err_msg}")
logging.error(f":cross_mark: <red>Failed error:</red> {err_msg}")
time.sleep(0.5)
return False
# Successful registration, final check for neuron and pubkey
Expand Down
2 changes: 2 additions & 0 deletions bittensor/core/extrinsics/set_weights.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,8 @@ def set_weights_extrinsic(
logging.info(
f":satellite: <magenta>Setting weights on </magenta><blue>{subtensor.network}<blue> <magenta>...</magenta>"
)
logging.debug(f"Weights: {[float(v / 65535) for v in weight_vals]}")

try:
success, error_message = do_set_weights(
self=subtensor,
Expand Down
5 changes: 5 additions & 0 deletions bittensor/core/extrinsics/transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ def transfer_extrinsic(
return False

logging.info(":satellite: <magenta>Transferring...</magenta>")
logging.info(f"\tAmount: <blue>{transfer_balance}</blue>")
logging.info(f"\tfrom: <blue>{wallet.name}:{wallet.coldkey.ss58_address}</blue>")
logging.info(f"\tTo: <blue>{dest}</blue>")
logging.info(f"\tFor fee: <blue>{fee}</blue>")

success, block_hash, error_message = do_transfer(
self=subtensor,
wallet=wallet,
Expand Down

0 comments on commit e50b59b

Please sign in to comment.