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

Annoying put block failure log #251

Closed
zjshen14 opened this issue Oct 30, 2018 · 0 comments
Closed

Annoying put block failure log #251

zjshen14 opened this issue Oct 30, 2018 · 0 comments
Labels
bettereng Better engineering quality

Comments

@zjshen14
Copy link
Contributor

We have two code path that a block could be appended to the blockchain: 1) consensus module commits a block after reaching consensus; 2) block sync receives a block from peers. The race condition could happen between the two path. However, it should not matter if a block has been put successfully already, and the second put fails because the block exists already. We need to catch the error on both side and check the error type. If the error is that block exists already, we shouldn't log an error

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

No branches or pull requests

1 participant