class ConstantFieldValidationRule implements DetachedBlockHeaderValidationRule {

  @Override
  public boolean validate(final BlockHeader header, final BlockHeader parent) {
    final T actualValue = accessor.apply(header);
    if (!actualValue.equals(expectedValue)) {
      LOG.trace(
          "{} failed validation. Actual != Expected ({} != {}).",
          fieldName,
          actualValue,
          expectedValue);
      return false;
    }
    return true;
  }

  public  ConstantFieldValidationRule(
      final String fieldName, final Function<BlockHeader, T> accessor, final T expectedValue);

}