From ccc85904d9e79ec08a86e4a956e6eafb72a044eb Mon Sep 17 00:00:00 2001 From: Giacomo Pasini <21265557+zeegomo@users.noreply.github.com> Date: Tue, 7 Nov 2023 15:24:49 +0100 Subject: [PATCH] do not use prefix in serialization (#514) --- nomos-services/consensus/src/lib.rs | 2 +- nomos-utils/src/lib.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nomos-services/consensus/src/lib.rs b/nomos-services/consensus/src/lib.rs index 859a080a..26627c4f 100644 --- a/nomos-services/consensus/src/lib.rs +++ b/nomos-services/consensus/src/lib.rs @@ -1203,7 +1203,7 @@ mod tests { eprintln!("{serialized}"); assert_eq!( serialized, - r#"{"id":"0x0000000000000000000000000000000000000000000000000000000000000000","current_view":1,"highest_voted_view":-1,"local_high_qc":{"view":0,"id":"0x0000000000000000000000000000000000000000000000000000000000000000"},"tip":{"id":"0x0000000000000000000000000000000000000000000000000000000000000000","view":0,"parent_qc":{"Standard":{"view":0,"id":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"leader_proof":{"LeaderId":{"leader_id":"0x0000000000000000000000000000000000000000000000000000000000000000"}}},"last_view_timeout_qc":null,"last_committed_block":{"id":"0x0000000000000000000000000000000000000000000000000000000000000000","view":0,"parent_qc":{"Standard":{"view":0,"id":"0x0000000000000000000000000000000000000000000000000000000000000000"}},"leader_proof":{"LeaderId":{"leader_id":"0x0000000000000000000000000000000000000000000000000000000000000000"}}}}"# + r#"{"id":"0000000000000000000000000000000000000000000000000000000000000000","current_view":1,"highest_voted_view":-1,"local_high_qc":{"view":0,"id":"0000000000000000000000000000000000000000000000000000000000000000"},"tip":{"id":"0000000000000000000000000000000000000000000000000000000000000000","view":0,"parent_qc":{"Standard":{"view":0,"id":"0000000000000000000000000000000000000000000000000000000000000000"}},"leader_proof":{"LeaderId":{"leader_id":"0000000000000000000000000000000000000000000000000000000000000000"}}},"last_view_timeout_qc":null,"last_committed_block":{"id":"0000000000000000000000000000000000000000000000000000000000000000","view":0,"parent_qc":{"Standard":{"view":0,"id":"0000000000000000000000000000000000000000000000000000000000000000"}},"leader_proof":{"LeaderId":{"leader_id":"0000000000000000000000000000000000000000000000000000000000000000"}}}}"# ); let deserialized: CarnotInfo = serde_json::from_str(&serialized).unwrap(); diff --git a/nomos-utils/src/lib.rs b/nomos-utils/src/lib.rs index 356e4689..01a2b3f5 100644 --- a/nomos-utils/src/lib.rs +++ b/nomos-utils/src/lib.rs @@ -5,7 +5,7 @@ pub mod serde { serializer: S, ) -> Result { use serde::Serialize; - const_hex::const_encode::(&src) + const_hex::const_encode::(&src) .as_str() .serialize(serializer) }