Quick fix to avoid a tight loop when processing added blocks in txpool (#6309)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/6331/head
Fabio Di Fabio 11 months ago committed by GitHub
parent 1a7244f808
commit 1385d46bdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 7
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPool.java

@ -359,6 +359,13 @@ public class TransactionPool implements BlockAddedObserver {
} finally { } finally {
blockAddedLock.unlock(); blockAddedLock.unlock();
} }
} else {
try {
// wait a bit before retrying
Thread.sleep(100);
} catch (InterruptedException e) {
throw new RuntimeException(e);
}
} }
} }
return null; return null;

Loading…
Cancel
Save