Skip to content

Commit

Permalink
Quick fix to avoid a tight loop when processing added blocks in txpool (
Browse files Browse the repository at this point in the history
hyperledger#6309)

Signed-off-by: Fabio Di Fabio <[email protected]>
  • Loading branch information
fab-10 authored Dec 18, 2023
1 parent 1a7244f commit 1385d46
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,13 @@ public void onBlockAdded(final BlockAddedEvent event) {
} finally {
blockAddedLock.unlock();
}
} else {
try {
// wait a bit before retrying
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
}
}
return null;
Expand Down

0 comments on commit 1385d46

Please sign in to comment.