File tree Expand file tree Collapse file tree
crates/common/src/interop/ssv Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,9 +17,9 @@ pub async fn request_ssv_pubkeys_from_ssv_node(
1717 http_timeout : Duration ,
1818) -> eyre:: Result < SSVNodeResponse > {
1919 let client = reqwest:: ClientBuilder :: new ( ) . timeout ( http_timeout) . build ( ) ?;
20- // The SSV node API expects operator IDs as numeric (uint64) values. Serializing the
21- // U256 directly emits a JSON string, which the node rejects with a 400, so narrow it
22- // to a u64 first.
20+ // The SSV node API expects operator IDs as numeric (uint64) values. Serializing
21+ // the U256 directly emits a JSON string, which the node rejects with a 400,
22+ // so narrow it to a u64 first.
2323 let operator_id = u64:: try_from ( node_operator_id)
2424 . map_err ( |e| eyre:: eyre!( "SSV node operator ID does not fit in u64: {e}" ) ) ?;
2525 let body = json ! ( {
@@ -66,8 +66,9 @@ mod tests {
6666 fn ssv_node_request_serializes_operator_as_number ( ) {
6767 let node_operator_id = U256 :: from ( 100u64 ) ;
6868
69- // Regression guard: serializing the U256 directly emits a (hex) JSON string, which
70- // the SSV node rejects ("cannot unmarshal string into ... uint64").
69+ // Regression guard: serializing the U256 directly emits a (hex) JSON string,
70+ // which the SSV node rejects ("cannot unmarshal string into ...
71+ // uint64").
7172 let stringy = serde_json:: to_string ( & json ! ( { "operators" : [ node_operator_id] } ) ) . unwrap ( ) ;
7273 assert_eq ! ( stringy, r#"{"operators":["0x64"]}"# ) ;
7374
You can’t perform that action at this time.
0 commit comments