Update error messages in clique header validation (#81)

tmohay 6 years ago committed by GitHub
parent c21177269e
commit 8bccd68a24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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