Skip to content

Commit

Permalink
Correctly release txpool save and restore lock in case of exceptions (h…
Browse files Browse the repository at this point in the history
…yperledger#7473)

Signed-off-by: Fabio Di Fabio <fabio.difabio@consensys.net>
Signed-off-by: Ade Lucas <ade.lucas@consensys.net>
  • Loading branch information
fab-10 authored and cloudspores committed Aug 22, 2024
1 parent facd1bc commit 4137016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- 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 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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,8 @@ private CompletableFuture<Void> serializeAndDedupOperation(

isCancelled.set(false);
operationInProgress.set(
CompletableFuture.runAsync(operation).thenRun(diskAccessLock::release));
CompletableFuture.runAsync(operation)
.whenComplete((res, err) -> diskAccessLock.release()));
return operationInProgress.get();
} else {
CompletableFuture.failedFuture(
Expand Down

0 comments on commit 4137016

Please sign in to comment.