Correctly release txpool save and restore lock in case of exceptions (#7473)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
pull/7476/head
Fabio Di Fabio 3 months ago committed by GitHub
parent dff99f7c17
commit 12576d7705
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      ethereum/eth/src/main/java/org/hyperledger/besu/ethereum/eth/transactions/TransactionPool.java

@ -26,6 +26,7 @@
- Fix protocol schedule check for devnets [#7429](https://github.com/hyperledger/besu/pull/7429) - Fix protocol schedule check for devnets [#7429](https://github.com/hyperledger/besu/pull/7429)
- Fix behaviour when starting in a pre-merge network [#7431](https://github.com/hyperledger/besu/pull/7431) - Fix behaviour when starting in a pre-merge network [#7431](https://github.com/hyperledger/besu/pull/7431)
- Fix tracing in precompiled contracts when halting for out of gas [#7318](https://github.com/hyperledger/besu/issues/7318) - Fix tracing in precompiled contracts when halting for out of gas [#7318](https://github.com/hyperledger/besu/issues/7318)
- Correctly release txpool save and restore lock in case of exceptions [#7473](https://github.com/hyperledger/besu/pull/7473)
## 24.7.1 ## 24.7.1

@ -706,7 +706,8 @@ public class TransactionPool implements BlockAddedObserver {
isCancelled.set(false); isCancelled.set(false);
operationInProgress.set( operationInProgress.set(
CompletableFuture.runAsync(operation).thenRun(diskAccessLock::release)); CompletableFuture.runAsync(operation)
.whenComplete((res, err) -> diskAccessLock.release()));
return operationInProgress.get(); return operationInProgress.get();
} else { } else {
CompletableFuture.failedFuture( CompletableFuture.failedFuture(

Loading…
Cancel
Save