5098 branch 6 update invalid blob count (#7407)

* 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>
pull/7427/head
Matilda-Clerke 4 months ago committed by GitHub
parent 1958df9651
commit 2ddfc2cbfb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      ethereum/api/src/main/java/org/hyperledger/besu/ethereum/api/jsonrpc/internal/methods/engine/AbstractEngineNewPayload.java

@ -466,7 +466,7 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
// 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());
}
@ -505,7 +505,7 @@ public abstract class AbstractEngineNewPayload extends ExecutionEngineJsonRpcMet
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();

Loading…
Cancel
Save