Skip to content

Commit

Permalink
review suggestions
Browse files Browse the repository at this point in the history
Signed-off-by: Jason Frame <jason.frame@consensys.net>
  • Loading branch information
jframe committed Oct 17, 2024
1 parent 3ee1b31 commit 21b7aae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public enum RpcErrorType implements RpcMethodError {
INVALID_REMOTE_CAPABILITIES_PARAMS(
INVALID_PARAMS_ERROR_CODE, "Invalid remote capabilities params"),
INVALID_REWARD_PERCENTILES_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid reward percentiles params"),
INVALID_REQUESTS_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid versioned hash params"),
INVALID_REQUESTS_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid requests params"),
INVALID_SEALER_ID_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid sealer ID params"),
INVALID_STORAGE_KEYS_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid storage keys params"),
INVALID_SUBSCRIPTION_PARAMS(INVALID_PARAMS_ERROR_CODE, "Invalid subscription params"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public boolean validate(

if (hasRequestsHash) {
LOG.warn(
"Block {} header contains requests_root but requests are prohibited", block.getHash());
"Block {} header contains requests_hash but requests are prohibited", block.getHash());
}

return !hasRequestsHash;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private boolean isRequestsHashValid(final Block block, final Optional<List<Reque
final Optional<Hash> maybeRequestsHash = block.getHeader().getRequestsHash();

if (maybeRequestsHash.isEmpty()) {
LOG.warn("Block {} must contain requests root", blockHash);
LOG.warn("Block {} must contain requests hash", blockHash);
return false;
}

Expand All @@ -73,9 +73,7 @@ private boolean isRequestsHashValid(final Block block, final Optional<List<Reque

final Hash expectedRequestsHash = BodyValidation.requestsHash(requests.get());
if (!expectedRequestsHash.equals(maybeRequestsHash.get())) {
LOG.warn(
"Block {} requests root does not match expected hash root for requests in block",
blockHash);
LOG.warn("Block {} requests hash does not match expected request hash", blockHash);
return false;
}
return true;
Expand Down

0 comments on commit 21b7aae

Please sign in to comment.