[export hardcoded sync]: use debug for H256
(#11204)
Fixes #11202 The `Display` implementation for `SpecHardcodedSync` used the `Display` implementation of `ethereum_types::H256` which doesn't show the full hash which this fixes.
This commit is contained in:
parent
ffeaee778c
commit
c4ca84cdf3
@ -252,7 +252,7 @@ impl fmt::Display for SpecHardcodedSync {
|
||||
writeln!(f, "{{")?;
|
||||
writeln!(f, r#"header": "{:?},"#, self.header)?;
|
||||
writeln!(f, r#"total_difficulty": "{:?},"#, self.total_difficulty)?;
|
||||
writeln!(f, r#"chts": {:#?}"#, self.chts.iter().map(|x| format!(r#"{}"#, x)).collect::<Vec<_>>())?;
|
||||
writeln!(f, r#"chts": {:#?}"#, self.chts.iter().map(|x| format!(r#"{:?}"#, x)).collect::<Vec<_>>())?;
|
||||
writeln!(f, "}}")
|
||||
}
|
||||
}
|
||||
|
@ -96,7 +96,7 @@ pub fn execute(cmd: ExportHsyncCmd) -> Result<String, String> {
|
||||
let hs = service.client().read_hardcoded_sync()
|
||||
.map_err(|e| format!("Error reading hardcoded sync: {}", e))?;
|
||||
if let Some(hs) = hs {
|
||||
Ok(format!("{}", hs))
|
||||
Ok(hs.to_string())
|
||||
} else {
|
||||
Err("Error: cannot generate hardcoded sync because the database is empty.".into())
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user