-
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: blocked mnlistdiff processing #263
Conversation
long newHeight = ((CoinbaseTx) mnlistdiff.coinBaseTx.getExtraPayloadObject()).getHeight(); | ||
block = blockChain.getBlock(mnlistdiff.getBlockHash()); | ||
|
||
if(!isLoadingBootStrap && block.getHeight() != newHeight) | ||
throw new ProtocolException("mnlistdiff blockhash (height="+block.getHeight()+" doesn't match coinbase blockheight: " + newHeight); | ||
|
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.
block = blockChain.getBlock(mnlistdiff.getBlockHash());
Based on the logs, this line of code was probably taking too long. We don't really need it because if the block heights don't match, then neither will the block hashes which will be discovered later in the code.
// TODO: Remove with v21.0.1 | ||
if (lock.isLocked()) { | ||
log.warn("the lock is held. holdCount {}, queue length {}, held by this thread {}", lock.getHoldCount(), lock.getQueueLength(), lock.isHeldByCurrentThread()); | ||
log.warn("the current thread is {} with stack trace:", Thread.currentThread().getName()); | ||
StackTraceElement [] trace = lock.getOwner().getStackTrace(); | ||
for (StackTraceElement e : trace) { | ||
log.info(" {}", e); | ||
} | ||
log.warn("the lock is held by {} with stack trace:", lock.getOwner()); | ||
trace = lock.getOwner().getStackTrace(); | ||
for (StackTraceElement e : trace) { | ||
log.info(" {}", e); | ||
} | ||
for (Thread thread : lock.getQueuedThreads()) { | ||
log.info("queued thread: {}\n stack trace:", thread.getName()); | ||
trace = thread.getStackTrace(); | ||
for (StackTraceElement e : trace) { | ||
log.info(" {}", e); | ||
} | ||
} | ||
} |
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.
We don't need this deadlock detector anymore.
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
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only