|
|
|
@ -84,7 +84,7 @@ public class CheckpointDownloadBlockStep { |
|
|
|
|
final PeerTaskResult<Block> peerTaskResult) { |
|
|
|
|
final Block block = peerTaskResult.getResult(); |
|
|
|
|
if (synchronizerConfiguration.isPeerTaskSystemEnabled()) { |
|
|
|
|
CompletableFuture<Optional<BlockWithReceipts>> futureReceipts = new CompletableFuture<>(); |
|
|
|
|
return ethContext.getScheduler().scheduleServiceTask(() -> { |
|
|
|
|
GetReceiptsFromPeerTask task = |
|
|
|
|
new GetReceiptsFromPeerTask( |
|
|
|
|
List.of(block.getHeader()), new BodyValidator(), currentProtocolSpecSupplier); |
|
|
|
@ -104,11 +104,11 @@ public class CheckpointDownloadBlockStep { |
|
|
|
|
"PeerTask response code was success, but incorrect number of receipts returned"); |
|
|
|
|
} |
|
|
|
|
BlockWithReceipts blockWithReceipts = new BlockWithReceipts(block, transactionReceipts); |
|
|
|
|
futureReceipts.complete(Optional.of(blockWithReceipts)); |
|
|
|
|
return CompletableFuture.completedFuture(Optional.of(blockWithReceipts)); |
|
|
|
|
} else { |
|
|
|
|
futureReceipts.complete(Optional.empty()); |
|
|
|
|
return CompletableFuture.completedFuture(Optional.empty()); |
|
|
|
|
} |
|
|
|
|
return futureReceipts; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
final org.hyperledger.besu.ethereum.eth.manager.task.GetReceiptsFromPeerTask |
|
|
|
|