mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-08 17:26:04 +00:00
Remove duplicate 0x on ssz_types serialization
This commit is contained in:
@@ -503,7 +503,7 @@ mod test {
|
|||||||
"gasLimit": "0x1",
|
"gasLimit": "0x1",
|
||||||
"gasUsed": "0x2",
|
"gasUsed": "0x2",
|
||||||
"timestamp": "0x2a",
|
"timestamp": "0x2a",
|
||||||
"extraData": [],
|
"extraData": "0x",
|
||||||
"baseFeePerGas": HASH_00,
|
"baseFeePerGas": HASH_00,
|
||||||
"blockHash": HASH_01,
|
"blockHash": HASH_01,
|
||||||
"transactions": [],
|
"transactions": [],
|
||||||
|
|||||||
@@ -8,10 +8,7 @@ where
|
|||||||
S: Serializer,
|
S: Serializer,
|
||||||
U: Unsigned,
|
U: Unsigned,
|
||||||
{
|
{
|
||||||
let mut hex_string: String = "0x".to_string();
|
serializer.serialize_str(&hex::encode(&bytes[..]))
|
||||||
hex_string.push_str(&hex::encode(&bytes[..]));
|
|
||||||
|
|
||||||
serializer.serialize_str(&hex_string)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deserialize<'de, D, U>(deserializer: D) -> Result<FixedVector<u8, U>, D::Error>
|
pub fn deserialize<'de, D, U>(deserializer: D) -> Result<FixedVector<u8, U>, D::Error>
|
||||||
|
|||||||
@@ -9,10 +9,7 @@ where
|
|||||||
S: Serializer,
|
S: Serializer,
|
||||||
N: Unsigned,
|
N: Unsigned,
|
||||||
{
|
{
|
||||||
let mut hex_string: String = "0x".to_string();
|
serializer.serialize_str(&hex::encode(&**bytes))
|
||||||
hex_string.push_str(&hex::encode(&**bytes));
|
|
||||||
|
|
||||||
serializer.serialize_str(&hex_string)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn deserialize<'de, D, N>(deserializer: D) -> Result<VariableList<u8, N>, D::Error>
|
pub fn deserialize<'de, D, N>(deserializer: D) -> Result<VariableList<u8, N>, D::Error>
|
||||||
|
|||||||
Reference in New Issue
Block a user