class GasUsageValidationRule implements DetachedBlockHeaderValidationRule {

  @Override
  public boolean validate(final BlockHeader header, final BlockHeader parent) {
    if (header.getGasUsed() > header.getGasLimit()) {
      LOG.trace(
          "Invalid block header: gas used {} exceeds gas limit {}",
          header.getGasUsed(),
          header.getGasLimit());
      return false;
    }

    return true;
  }

}