diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AttachedBlockHeaderValidationRule.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AttachedBlockHeaderValidationRule.java index 1dee9a3803..8f78b1d926 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AttachedBlockHeaderValidationRule.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/AttachedBlockHeaderValidationRule.java @@ -26,4 +26,8 @@ public interface AttachedBlockHeaderValidationRule { * @return {@code true} if valid; otherwise {@code false} */ boolean validate(BlockHeader header, BlockHeader parent, ProtocolContext protocolContext); + + default boolean includeInLightValidation() { + return true; + } } diff --git a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/BlockHeaderValidator.java b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/BlockHeaderValidator.java index 94e954434f..fe3c79ca31 100644 --- a/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/BlockHeaderValidator.java +++ b/ethereum/core/src/main/java/tech/pegasys/pantheon/ethereum/mainnet/BlockHeaderValidator.java @@ -120,7 +120,7 @@ public class BlockHeaderValidator { private final List> rules = new ArrayList<>(); public Builder addRule(final AttachedBlockHeaderValidationRule rule) { - this.rules.add(new Rule<>(false, rule, true)); + this.rules.add(new Rule<>(false, rule, rule.includeInLightValidation())); return this; }