Skip to content

Commit

Permalink
5098 branch 6 update invalid blob count (#7407)
Browse files Browse the repository at this point in the history
* 5098: Add RpcErrorTypes

Signed-off-by: Matilda Clerke <[email protected]>

---------

Signed-off-by: Matilda Clerke <[email protected]>
Signed-off-by: Matilda-Clerke <[email protected]>
Co-authored-by: Sally MacFarlane <[email protected]>
  • Loading branch information
Matilda-Clerke and macfarla authored Aug 2, 2024
1 parent 1958df9 commit 2ddfc2c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ protected ValidationResult<RpcErrorType> validateBlobs(
// blob transactions must have at least one blob
if (versionedHashes.isEmpty()) {
return ValidationResult.invalid(
RpcErrorType.INVALID_PARAMS, "There must be at least one blob");
RpcErrorType.INVALID_BLOB_COUNT, "There must be at least one blob");
}
transactionVersionedHashes.addAll(versionedHashes.get());
}
Expand Down Expand Up @@ -505,7 +505,7 @@ protected ValidationResult<RpcErrorType> validateBlobs(
if (protocolSpec.getGasCalculator().blobGasCost(transactionVersionedHashes.size())
> protocolSpec.getGasLimitCalculator().currentBlobGasLimit()) {
return ValidationResult.invalid(
RpcErrorType.INVALID_PARAMS,
RpcErrorType.INVALID_BLOB_COUNT,
String.format("Invalid Blob Count: %d", transactionVersionedHashes.size()));
}
return ValidationResult.valid();
Expand Down

0 comments on commit 2ddfc2c

Please sign in to comment.