Update network resolution by reusing resolve_network from helpers#411
Update network resolution by reusing resolve_network from helpers#411statxc wants to merge 5 commits intoentrius:testfrom
Conversation
|
Review of refactor/reuse-resolve-network
|
anderdc
left a comment
There was a problem hiding this comment.
- Bug — config
networkfallback dropped: old_resolve_endpointchecked_load_config_value('network')whenws_endpointwas absent in config.resolve_networkin helpers.py skips that — jumps straight to finney default (line 590). Users with only"network": "test"in~/.gittensor/config.jsonwill silently hit mainnet. Fix: add aconfig.get('network')fallback branch inresolve_networkbetween thews_endpointcheck and the finney default. - Wrapper can be inlined:
_resolve_endpointis called once — replace withws_endpoint, _ = resolve_network(network=network, rpc_url=rpc_url)and delete the wrapper.
…apper call in miner post
|
@anderdc I have updated. Thanks for your feedback. |
Description
NETWORK_MAPdict and_resolve_endpoint()function fromcli/miner_commands/post.pyresolve_network()incli/issue_commands/helpers.pywhich handles the same priority chain (rpc-url > network flag > config > default)No behavior change.