Skip to content
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

cli: print nicer message when miner hasn't initialized #911

Merged
merged 1 commit into from
Dec 16, 2019
Merged

cli: print nicer message when miner hasn't initialized #911

merged 1 commit into from
Dec 16, 2019

Conversation

jsign
Copy link
Contributor

@jsign jsign commented Dec 13, 2019

Fixes #810
The GH issue has a little history of this error that has popped in Slack channel a few times.

Feels like this peer.ID("SETME") should be a constant somewhere. The other place that is used is in lotus-fountain. If there's a clear place to put it, I can change it.

Signed-off-by: jsign <jsign.uy@gmail.com>
@jsign jsign marked this pull request as ready for review December 13, 2019 20:21
@magik6k
Copy link
Contributor

magik6k commented Dec 14, 2019

Good catch, I'm not sure if we want to hardcode that string as 'not initialized', even though it should be fine.

@Kubuxu @whyrusleeping opinions?

@whyrusleeping
Copy link
Member

eh, no strong opinions, though maybe we do a length check and say "if the peer ID isnt above the minimum real peerID length, its not initialized" or something?

@jsign
Copy link
Contributor Author

jsign commented Dec 16, 2019

eh, no strong opinions, though maybe we do a length check and say "if the peer ID isnt above the minimum real peerID length, its not initialized" or something?

I guess that if the only time a peer.ID can have an invalid value is SETME, it would be better to keep checking for that particular value to output this message.

Maybe doing the length check won't make apparent future invalid values introduced by some buggy behavior... better to get the weird output again than confuse it with this scenario.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

query-ask: length greater than remaining number of bytes in buffer
3 participants