Skip to content

Commit

Permalink
keep error info as before
Browse files Browse the repository at this point in the history
  • Loading branch information
halibobo1205 committed Nov 14, 2023
1 parent 80f2a2d commit 2987803
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class BigTransactionValidator extends AbstractTransactionValidator {
protected Pair<GrpcAPI.Return.response_code, String> doValidate(TransactionCapsule trx) {
if (trx.getSerializedSize() > Constant.TRANSACTION_MAX_BYTE_SIZE) {
return buildResponse(GrpcAPI.Return.response_code.TOO_BIG_TRANSACTION_ERROR,
"too big transaction, the size is %d bytes", trx.getSerializedSize());
"Too big transaction, the size is %d bytes", trx.getSerializedSize());
}
return SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ protected Pair<GrpcAPI.Return.response_code, String> doValidate(TransactionCapsu
int contractSize = trx.getContractSize();
if (contractSize != 1) {
return buildResponse(GrpcAPI.Return.response_code.CONTRACT_VALIDATE_ERROR,
"contract size should be exactly 1, this is extend feature ,actual :%d",
contractSize);
"tx %s contract size should be exactly 1, this is extend feature ,actual :%d",
trx.getTransactionId(), contractSize);
}
return SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public class DupTransactionValidator extends AbstractTransactionValidator {
protected Pair<GrpcAPI.Return.response_code, String> doValidate(TransactionCapsule trx) {
byte[] transactionId = trx.getTransactionId().getBytes();
if (transactionCache.has(transactionId) && transactionStore.has(transactionId)) {
return buildResponse(GrpcAPI.Return.response_code.DUP_TRANSACTION_ERROR, "dup trans");
return buildResponse(GrpcAPI.Return.response_code.DUP_TRANSACTION_ERROR, "dup trans : %s ",
trx.getTransactionId());
}
return SUCCESS;
}
Expand Down

0 comments on commit 2987803

Please sign in to comment.