Skip to content

Commit

Permalink
Merge branch 'main' into 5098-branch-9-update-invalid-block-count-params
Browse files Browse the repository at this point in the history
Signed-off-by: Matilda-Clerke <[email protected]>
  • Loading branch information
Matilda-Clerke authored Aug 12, 2024
2 parents 9758f31 + bca34cb commit 7c14379
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ public JsonRpcResponse response(final JsonRpcRequestContext request) {
throw new InvalidJsonRpcParameters(
"Invalid highest block parameter (index 1)", RpcErrorType.INVALID_BLOCK_PARAMS, e);
}

final Optional<List<Double>> maybeRewardPercentiles =
request.getOptionalParameter(2, Double[].class).map(Arrays::asList);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public void exceptionWhenNoNumberSuppliedTest() {
JsonRpcRequestContext requestContext = new JsonRpcRequestContext(request);
assertThatThrownBy(() -> method.response(requestContext))
.isInstanceOf(InvalidJsonRpcParameters.class)
.hasMessage("Invalid block parameter");
.hasMessage("Invalid block parameter (index 0)");

verifyNoMoreInteractions(blockchainQueries);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void shouldReturnErrorWhenMissingBlockNumberParam() {

assertThat(thrown)
.isInstanceOf(InvalidJsonRpcParameters.class)
.hasMessage("Invalid block parameter");
.hasMessage("Invalid block parameter (index 0)");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"id": 415,
"error": {
"code": -32602,
"message": "Invalid params"
"message": "Invalid block, unable to parse RLP"
}
},
"statusCode": 200
Expand Down

0 comments on commit 7c14379

Please sign in to comment.