From 4da8c822c453cd8c3f1875b89dde8d3edf3f4cf3 Mon Sep 17 00:00:00 2001 From: Fabio Di Fabio Date: Fri, 13 Dec 2024 16:33:38 +0100 Subject: [PATCH] Process code delegation in parallel if there are more that one Signed-off-by: Fabio Di Fabio --- .../besu/ethereum/mainnet/CodeDelegationProcessor.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/CodeDelegationProcessor.java b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/CodeDelegationProcessor.java index 977b5031936..bcf81f6ad99 100644 --- a/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/CodeDelegationProcessor.java +++ b/ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/CodeDelegationProcessor.java @@ -65,9 +65,9 @@ public CodeDelegationResult process( final EVMWorldUpdater evmWorldUpdater, final Transaction transaction) { final CodeDelegationResult result = new CodeDelegationResult(); - transaction - .getCodeDelegationList() - .get() + final var codeDelegations = transaction.getCodeDelegationList().get(); + + (codeDelegations.size() == 1 ? codeDelegations.stream() : codeDelegations.parallelStream()) .forEach( codeDelegation -> processAuthorization(