Skip to content

Commit 9f41938

Browse files
shemnonmatthew1001
authored andcommitted
Log blob count (besu-eth#6761)
Current blog logging shows blob transaction count. The blob count is more relevant and reflects the label better. Signed-off-by: Danno Ferrin (shemnon) <danno.ferrin@shemnon.com>
1 parent ca991e2 commit 9f41938

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,13 @@ public JsonRpcResponse syncResponse(final JsonRpcRequestContext requestContext)
320320

321321
if (executionResult.isSuccessful()) {
322322
logImportedBlockInfo(
323-
block, blobTransactions.size(), (System.currentTimeMillis() - startTimeMs) / 1000.0);
323+
block,
324+
blobTransactions.stream()
325+
.map(Transaction::getVersionedHashes)
326+
.flatMap(Optional::stream)
327+
.mapToInt(List::size)
328+
.sum(),
329+
(System.currentTimeMillis() - startTimeMs) / 1000.0);
324330
return respondWith(reqId, blockParam, newBlockHeader.getHash(), VALID);
325331
} else {
326332
if (executionResult.causedBy().isPresent()) {

0 commit comments

Comments
 (0)