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