Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Startpost rpc #1312
Startpost rpc #1312
Changes from 8 commits
b2e72dc
67f1716
d0806a1
25b9364
0804d61
77860cf
4408fba
6debcd2
d0274f1
3717cde
ca14381
6f50b1e
359864d
e2c2db5
a5a8b77
152f8da
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
You changed
logicalDrive
todataDir
andcommitmentSize
tospace
here but not in many other places. It should all be the same, and if the context is lost, you can dopostDatadir
&postSpace
, or something similar.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.
There are many more leftovers.
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.
Last time I wrote:
Now after
IsPostInitialized()
removal, you're not covering theDone
case.So this need to be fixed, and also you should set the
Done
statue value if you're getting "already initialized" err from the initializer. Also, IMO "already initialized" should not be appended to "PoST initialization failed: " string.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.
Why not to do this now as
if b.initStatus == InProgress
?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.
You're not inspecting "already initialized" to set a
Done
status.If you don't want to do it now, leave a TODO.
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.
there is no "already initialized error, we use the
initStatus
flag to know thisThere 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.
I was referring to an error which comes from
go-spacemesh/post
initializer. And my mistake - it will return "already completed" and not "already initialized" (that was the old version).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.
then I think we should not return an error in such a case, and simply return the proof, I think It's not the best idea to keep track for specific error messages in between repos, since this can easily break
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.
Any reason for not doing the unlock before launching the goroutine?