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

modified blockMinter.java to check for null peers (thanks @kennycud) #196

Closed
wants to merge 0 commits into from

Conversation

crowetic
Copy link

This change is to prevent NullPointerException and blockMinter thread crash.

The current theory is that nodes that have been running a long time have a higher likelihood of having a crashed blockMinter thread, thus preventing them from minting new blocks. Theory is that this is caused by nefarious nodes shutting their nodes down at the perfect time to allow a null peer to get into the peers list, and upon attempting to check for a higher weight block, a null pointer exception takes place, thus crashing the block minter.

When this happens, the block minter stays crashed, and doesn't fix itself.

We are looking into longer-term changes that will both more thoroughly handle the issue, and check the block minter for crashes and restart it, but for now this change should hopefully prevent a null peer from causing the null pointer, and thus prevent the block minter from crashing.

Thanks to @kennycud for the lesson and initially tracking down the issue!

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.

1 participant