-
Notifications
You must be signed in to change notification settings - Fork 101
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
fix: address several sync issues and remove a potential deadlock #247
Conversation
Signed-off-by: HashEngineering <[email protected]>
* improve logging with sendRequestWithRetry * count mnlistdiff size on Request not Complete * add fulfilled field to lastRequest and use it Signed-off-by: HashEngineering <[email protected]>
protocolVersion = NetworkParameters.ProtocolVersion.SMNLE_VERSIONED.getBitcoinProtocolVersion(); | ||
protocolVersion = NetworkParameters.ProtocolVersion.CURRENT.getBitcoinProtocolVersion(); |
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.
This fixes a problem where v20 bootstrap files cannot be loaded.
blockChain.addNewBestBlockListener(Threading.SAME_THREAD, newBestBlockListener); | ||
blockChain.addNewBestBlockListener(newBestBlockListener); |
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.
If newBestBlockListener
is running in SAME_THREAD, then it will be running under an AbstractBlockChain
lock which may be a cause of the deadlock I am trying to fix.
This is the only listener running in the same thread.
if (peer != null) { | ||
peer.queueMasternodeListDownloadedListeners(MasternodeListDownloadedListener.Stage.Received, quorumRotationInfo.getMnListDiffTip()); | ||
peer.queueMasternodeListDownloadedListeners(MasternodeListDownloadedListener.Stage.Received, quorumRotationInfo.getMnListDiffAtH()); | ||
peer.queueMasternodeListDownloadedListeners(MasternodeListDownloadedListener.Stage.Received, quorumRotationInfo.getMnListDiffAtHMinusC()); | ||
peer.queueMasternodeListDownloadedListeners(MasternodeListDownloadedListener.Stage.Received, quorumRotationInfo.getMnListDiffAtHMinus2C()); | ||
peer.queueMasternodeListDownloadedListeners(MasternodeListDownloadedListener.Stage.Received, quorumRotationInfo.getMnListDiffAtHMinus3C()); | ||
} |
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.
the goal here is to count qrinfo messages in the bandwidth calculations.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #247 +/- ##
============================================
+ Coverage 47.99% 48.00% +0.01%
- Complexity 6665 6669 +4
============================================
Files 409 409
Lines 46120 46128 +8
Branches 6503 6502 -1
============================================
+ Hits 22133 22146 +13
+ Misses 21574 21572 -2
+ Partials 2413 2410 -3 ☔ View full report in Codecov by Sentry. |
…tSendManager Signed-off-by: HashEngineering <[email protected]>
…wnloadPeer in AbstractQuorumState Signed-off-by: HashEngineering <[email protected]>
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.
Looks good
Issue being fixed or feature implemented
The goal is to reduce the changes of a deadlock and to fix other minor issues.
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only