do not use prefix in serialization
This commit is contained in:
parent
0730e05a6f
commit
efe56e87c4
|
@ -1199,7 +1199,7 @@ mod tests {
|
||||||
eprintln!("{serialized}");
|
eprintln!("{serialized}");
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
serialized,
|
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();
|
let deserialized: CarnotInfo = serde_json::from_str(&serialized).unwrap();
|
||||||
|
|
|
@ -5,7 +5,7 @@ pub mod serde {
|
||||||
serializer: S,
|
serializer: S,
|
||||||
) -> Result<S::Ok, S::Error> {
|
) -> Result<S::Ok, S::Error> {
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
const_hex::const_encode::<N, true>(&src)
|
const_hex::const_encode::<N, false>(&src)
|
||||||
.as_str()
|
.as_str()
|
||||||
.serialize(serializer)
|
.serialize(serializer)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue