Skip to content

Commit 0d5c23d

Browse files
author
Bernhard B
committed
fixed json-rpc debug log outputs
* moved them up a bit to also log something in case of an error see #482
1 parent 3573f6a commit 0d5c23d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: src/client/jsonrpc2.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,13 @@ func (r *JsonRpc2Client) getRaw(command string, account *string, args interface{
121121
resp = <-responseChan
122122
delete(r.receivedResponsesById, u.String())
123123

124+
log.Debug("json-rpc command response message: ", string(resp.Result))
125+
log.Debug("json-rpc response error: ", string(resp.Err.Message))
126+
124127
if resp.Err.Code != 0 {
125128
return "", errors.New(resp.Err.Message)
126129
}
127130

128-
log.Debug("json-rpc command response message: ", string(resp.Result))
129-
log.Debug("json-rpc response error: ", string(resp.Err.Message))
130-
131131
return string(resp.Result), nil
132132
}
133133

0 commit comments

Comments
 (0)