Skip to content

Commit

Permalink
return an error in readonly call sc
Browse files Browse the repository at this point in the history
  • Loading branch information
Thykof committed Dec 6, 2023
1 parent 320d35f commit c8132af
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions pkg/node/sendoperation/readonlycall.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ func EstimateGasCostCallSC(
if err != nil {
logger.Warnf("calling ReadOnlyCall: %s", err)

// Don't return error, just return default gas limit,
// because execute_read_only_call v27 execute_read_only_call may not work (Invalid params).
return DefaultGasLimitCallSC, nil
return 0, err
}

Check warning on line 49 in pkg/node/sendoperation/readonlycall.go

View check run for this annotation

Codecov / codecov/patch

pkg/node/sendoperation/readonlycall.go#L44-L49

Added lines #L44 - L49 were not covered by tests

estimatedGasCost := uint64(result.GasCost)
Expand Down

0 comments on commit c8132af

Please sign in to comment.