Address witdrawals failures in execution-spec-tests (#5005)

* wrap withdrawals in try/catch in AbstractBlockProcessor

Signed-off-by: garyschulte <garyschulte@gmail.com>
pull/5014/head
garyschulte 2 years ago committed by GitHub
parent 835769deaf
commit 6b9c1ce40d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      ethereum/core/src/main/java/org/hyperledger/besu/ethereum/mainnet/AbstractBlockProcessor.java

@ -142,9 +142,14 @@ public abstract class AbstractBlockProcessor implements BlockProcessor {
final Optional<WithdrawalsProcessor> maybeWithdrawalsProcessor =
protocolSchedule.getByBlockHeader(blockHeader).getWithdrawalsProcessor();
if (maybeWithdrawalsProcessor.isPresent() && maybeWithdrawals.isPresent()) {
maybeWithdrawalsProcessor
.get()
.processWithdrawals(maybeWithdrawals.get(), worldState.updater());
try {
maybeWithdrawalsProcessor
.get()
.processWithdrawals(maybeWithdrawals.get(), worldState.updater());
} catch (final Exception e) {
LOG.error("failed processing withdrawals", e);
return new BlockProcessingResult(Optional.empty(), e);
}
}
if (!rewardCoinbase(worldState, blockHeader, ommers, skipZeroBlockRewards)) {

Loading…
Cancel
Save