Skip to content

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
pinges committed Feb 21, 2025
1 parent e3e1c2f commit 9f1b6d3
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,13 @@ public AbstractDownloadReceiptsStep(
@Override
public CompletableFuture<List<BWR>> apply(final List<B> blocks) {
final List<BlockHeader> headers = blocks.stream().map(this::getBlockHeader).collect(toList());
LOG.atInfo()
.setMessage("Downloading receipts for block {}:{} to {}:{}")
.addArgument(headers.getFirst().getBlockHash())
.addArgument(headers.getFirst().getNumber())
.addArgument(headers.getLast().getBlockHash())
.addArgument(headers.getLast().getNumber())
.log();
if (synchronizerConfiguration.isPeerTaskSystemEnabled()) {
return ethContext
.getScheduler()
Expand All @@ -81,7 +88,7 @@ abstract List<BWR> combineBlocksAndReceipts(
private CompletableFuture<Map<BlockHeader, List<TransactionReceipt>>>
getReceiptsWithPeerTaskSystem(final List<BlockHeader> headers) {
final ArrayList<BlockHeader> originalBlockHeaders = new ArrayList<>(headers);
Map<BlockHeader, List<TransactionReceipt>> getReceipts = new HashMap<>();
Map<BlockHeader, List<TransactionReceipt>> getReceipts = HashMap.newHashMap(headers.size());
do {
GetReceiptsFromPeerTask task = new GetReceiptsFromPeerTask(headers, protocolSchedule);
PeerTaskExecutorResult<Map<BlockHeader, List<TransactionReceipt>>> getReceiptsResult =
Expand Down

0 comments on commit 9f1b6d3

Please sign in to comment.