Skip to content

Commit

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

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>

---------

Signed-off-by: Matilda Clerke <matilda.clerke@consensys.net>
Signed-off-by: Matilda-Clerke <matilda.clerke@consensys.net>
Co-authored-by: Sally MacFarlane <macfarla.github@gmail.com>
Signed-off-by: gconnect <agatevureglory@gmail.com>
  • Loading branch information
2 people authored and gconnect committed Aug 26, 2024
1 parent 5656b08 commit b11d633
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 b11d633

Please sign in to comment.