()
| 93 | } |
| 94 | |
| 95 | func (msg *jsonrpcMessage) isResponse() bool { |
| 96 | return msg.hasValidID() && msg.Method == "" && len(msg.Params) == 0 |
| 97 | } |
| 98 | |
| 99 | func (msg *jsonrpcMessage) hasValidID() bool { |
| 100 | return len(msg.ID) > 0 && msg.ID[0] != '{' && msg.ID[0] != '[' |