opentensor / btcli

Bittensor command line tool
https://docs.bittensor.com/btcli
13 stars 4 forks source link

Fixes for rpc request error handler, root list default empty values, prev delegate fetching #175

Closed thewhaleking closed 1 month ago

thewhaleking commented 1 month ago

In #131 we changed the request id of "rpc_request" to a randomised ID. Unfortunately, I neglected to update the error handler to reflect this change.

root list would fail because of None values in an ugly way. Use default empty values (such as []) for returns now.

Fixes root list-delegates running on non-archive nodes (such as local chain) by attempting to grab at a -1200 block offset first, then -200, then defaulting to None if previous delegates cannot be fetched.