mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-09 19:51:47 +00:00
json rpc id to value (#3110)
## Issue Addressed N/A ## Proposed Changes - Update the JSON-RPC id field for both our request and response objects to be a `serde_json::Value` rather than a `u32`. This field could be a string or a number according to the JSON-RPC 2.0 spec. We only ever set it to a number, but if, for example, we get a response that wraps this number in quotes, we would fail to deserialize it. I think because we're not doing any validation around this id otherwise, we should be less strict with it in this regard. ## Additional Info Co-authored-by: realbigsean <sean@sigmaprime.io>
This commit is contained in:
@@ -75,7 +75,7 @@ impl HttpJsonRpc {
|
||||
jsonrpc: JSONRPC_VERSION,
|
||||
method,
|
||||
params,
|
||||
id: STATIC_ID,
|
||||
id: json!(STATIC_ID),
|
||||
};
|
||||
|
||||
let mut request = self
|
||||
|
||||
Reference in New Issue
Block a user