mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 10:22:23 +00:00
rpc: fix truncate comment
This commit is contained in:
parent
a15b9c88cb
commit
5f1cbceb6b
1 changed files with 1 additions and 1 deletions
|
|
@ -478,7 +478,7 @@ func (h *handler) handleCallMsg(ctx *callProc, msg *jsonrpcMessage) *jsonrpcMess
|
|||
logCtx = append(logCtx, "err", resp.Error.Message)
|
||||
if resp.Error.Data != nil {
|
||||
errDataStr := fmt.Sprintf("%v", resp.Error.Data)
|
||||
// Truncate the error data as string if it is too long. Otherwise, preserve the original data.
|
||||
// Truncate the error data if it is too long. Otherwise, preserve the original data.
|
||||
if len(errDataStr) > callErrorDataLogTruncateLimit {
|
||||
remaining := len(errDataStr) - callErrorDataLogTruncateLimit
|
||||
errDataStr = fmt.Sprintf("%s... (truncated remaining %d chars)", errDataStr[:callErrorDataLogTruncateLimit], remaining)
|
||||
|
|
|
|||
Loading…
Reference in a new issue