Skip to content

Commit e2b1652

Browse files
fab-10jflo
authored andcommitted
Quick fix to avoid a tight loop when processing added blocks in txpool (besu-eth#6309)
Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net> Signed-off-by: jflo <justin+github@florentine.us>
1 parent 15ac7b6 commit e2b1652

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPool.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ public void onBlockAdded(final BlockAddedEvent event) {
359359
} finally {
360360
blockAddedLock.unlock();
361361
}
362+
} else {
363+
try {
364+
// wait a bit before retrying
365+
Thread.sleep(100);
366+
} catch (InterruptedException e) {
367+
throw new RuntimeException(e);
368+
}
362369
}
363370
}
364371
return null;

0 commit comments

Comments
 (0)