Update error messages in clique header validation (#81)

Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
tmohay 6 years ago committed by GitHub
parent 143c77854a
commit 4dc3d5c40f
  1. 6
      consensus/clique/src/main/java/tech/pegasys/pantheon/consensus/clique/headervalidationrules/CliqueExtraDataValidationRule.java

@ -80,21 +80,21 @@ public class CliqueExtraDataValidationRule
final Address proposer = CliqueBlockHashing.recoverProposerAddress(header, cliqueExtraData);
if (!expectedValidators.contains(proposer)) {
LOG.trace("Proposer sealing block is not a member of the validators.");
LOG.trace("Proposer sealing block is not a member of the signers.");
return false;
}
if (epochManager.isEpochBlock(header.getNumber())) {
if (!Iterables.elementsEqual(cliqueExtraData.getValidators(), expectedValidators)) {
LOG.trace(
"Incorrect validators. Expected {} but got {}.",
"Incorrect signers. Expected {} but got {}.",
expectedValidators,
cliqueExtraData.getValidators());
return false;
}
} else {
if (!cliqueExtraData.getValidators().isEmpty()) {
LOG.trace("Validator list on non-epoch blocks must be empty.");
LOG.trace("Singer list on non-epoch blocks must be empty.");
return false;
}
}

Loading…
Cancel
Save