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

etcm-678 etcm-660 fix for removing chain after the node restart #940

Merged
merged 5 commits into from
Mar 24, 2021

Conversation

bsuieric
Copy link
Contributor

@bsuieric bsuieric commented Mar 16, 2021

Description

Adding check validating if the block exists in chain - Using any of getXXXByHash is not always accurate - after restart the best block is often lower than before restart. This change is trying to resolve the branch and checking the existence of the block when trying to import blocks

@bsuieric bsuieric changed the title etcm-678 etcm-660 fix for removing chain after the node restart WIP: etcm-678 etcm-660 fix for removing chain after the node restart Mar 16, 2021
@bsuieric bsuieric changed the title WIP: etcm-678 etcm-660 fix for removing chain after the node restart etcm-678 etcm-660 fix for removing chain after the node restart Mar 22, 2021
@bsuieric bsuieric force-pushed the bug/ETCM-678-after-node-restart branch from b7f2b32 to cde6728 Compare March 23, 2021 14:15
//not reorganising anymore until oldBlock4(not part of the chain anymore), no block/ommer validation when not part of the chain, resolveBranch is returning UnknownBranch
blockImporter ! BlockFetcher.PickedBlocks(NonEmptyList.fromListUnsafe(List(newComerBlock5WithOldBlock4Parent)))

Thread.sleep(200)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that hurts. is there a plan to get rid of Thread.sleep?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eventually is pretty neat :)

Copy link
Contributor

@dzajkowski dzajkowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added a few nitpicks but overall looks ok

@bsuieric bsuieric merged commit 6e183f8 into develop Mar 24, 2021
@dzajkowski dzajkowski deleted the bug/ETCM-678-after-node-restart branch April 9, 2021 12:01
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.

5 participants