-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix chia farm summary
aborting early if no local full node present
#16387
Fix chia farm summary
aborting early if no local full node present
#16387
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to provide at least some information about the failure, in addition to the other information. At least for most errors. Maybe we could specifically handle ClientConnectorError
in a quiet way and provide noisier output for all other exceptions? I'm ok with continuing on in both cases and providing the rest of the information we can provide.
Also... Thank you! |
Yes, that's a good idea. Updated to silently handle |
499fcb2
to
5c1a3d6
Compare
5c1a3d6
to
697b89c
Compare
697b89c
to
0f6a317
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, pending CI. Thanks for the work and the contribution.
Actually, sorry, could you rebase and retarget this to |
Before 2.0, even if no local full node was present, `chia farm summary` would still show useful information: $ chia farm summary Farming status: Not available Local Harvester 1 plots of size: 101.320 GiB on-disk, 101.400 GiBe (effective) Plot count for all harvesters: 1 Total size of plots: 101.320 GiB, 101.400 GiBe (effective) Estimated network space: Unknown Expected time to win: Unknown For details on farmed rewards and fees you should run 'chia start wallet' and 'chia wallet show' However, since 2.0, that is no longer the case. `chia farm summary` simply aborts with an exception: $ chia farm summary Error: Connection error: ClientConnectorError: Cannot connect to host localhost:8555 ssl:<ssl.SSLContext object at 0x7fe0edd533c0> [Connect call failed ('127.0.0.1', 8555)] Check if full node rpc is running at 8555 This is normal if full node is still starting up This fixes this particular regression which is rather annoying for farmers farming to a remote node. Fixes Chia-Network#16164. Related to issue Chia-Network#9615, but that issue is wider in scope.
With this change, only the exceptions when failing to connect to a local full node and/or wallet are suppressed, as these cases are already properly handled by adjusted command output. Any other exception is printed to stderr.
0f6a317
to
9ffb0ce
Compare
Sure, done. And thanks for your review! |
Before 2.0, even if no local full node was present,
chia farm summary
would still show useful information:However, since 2.0, that is no longer the case.
chia farm summary
simply aborts with an exception:This fixes this particular regression which is rather annoying for farmers farming to a remote node.
Fixes #16164. Related to issue #9615, but that issue is wider in scope.