|
|
|
@ -16,6 +16,7 @@ package org.hyperledger.besu.ethereum.mainnet.headervalidationrules; |
|
|
|
|
|
|
|
|
|
import static java.lang.Boolean.FALSE; |
|
|
|
|
|
|
|
|
|
import org.hyperledger.besu.config.MergeConfigOptions; |
|
|
|
|
import org.hyperledger.besu.datatypes.Hash; |
|
|
|
|
import org.hyperledger.besu.ethereum.core.BlockHeader; |
|
|
|
|
import org.hyperledger.besu.ethereum.mainnet.DetachedBlockHeaderValidationRule; |
|
|
|
@ -69,6 +70,12 @@ public final class ProofOfWorkValidationRule implements DetachedBlockHeaderValid |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// TODO: remove this rule bypass, use post-merge headervalidation rules
|
|
|
|
|
// https://github.com/hyperledger/besu/issues/2898
|
|
|
|
|
if (MergeConfigOptions.isMergeEnabled()) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
final Hash headerHash = hashHeader(header); |
|
|
|
|
PoWSolution solution = |
|
|
|
|
hasher.hash(header.getNonce(), header.getNumber(), epochCalculator, headerHash); |
|
|
|
|