fixed compilation errors
This commit is contained in:
parent
57b0be2a0b
commit
407f046b9c
@ -53,7 +53,7 @@ pub fn json_chain_test(json_data: &[u8], era: ChainEra) -> Vec<String> {
|
|||||||
|
|
||||||
let temp = RandomTempPath::new();
|
let temp = RandomTempPath::new();
|
||||||
{
|
{
|
||||||
let client = Client::new(ClientConfig::default(), spec, temp.as_path(), IoChannel::disconnected());
|
let client = Client::new(ClientConfig::default(), spec, temp.as_path(), IoChannel::disconnected()).unwrap();
|
||||||
for b in &blockchain.blocks_rlp() {
|
for b in &blockchain.blocks_rlp() {
|
||||||
if Block::is_good(&b) {
|
if Block::is_good(&b) {
|
||||||
let _ = client.import_block(b.clone());
|
let _ = client.import_block(b.clone());
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
//! TraceDB errors.
|
//! TraceDB errors.
|
||||||
|
|
||||||
use std::fmt::{Debug, Display, Formatter, Error as FmtError};
|
use std::fmt::{Display, Formatter, Error as FmtError};
|
||||||
|
|
||||||
const RESYNC_ERR: &'static str =
|
const RESYNC_ERR: &'static str =
|
||||||
"Your current parity installation has synced without transaction tracing. To use
|
"Your current parity installation has synced without transaction tracing. To use
|
||||||
@ -27,20 +27,13 @@ database and restart parity. e.g.:
|
|||||||
> parity";
|
> parity";
|
||||||
|
|
||||||
/// TraceDB errors.
|
/// TraceDB errors.
|
||||||
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
/// Returned when tracing is enabled,
|
/// Returned when tracing is enabled,
|
||||||
/// but database does not contain traces of old transactions.
|
/// but database does not contain traces of old transactions.
|
||||||
ResyncRequired,
|
ResyncRequired,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// TODO: replace `Debug` with default implementation,
|
|
||||||
/// once we stop using it to display errors to user.
|
|
||||||
impl Debug for Error {
|
|
||||||
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
|
|
||||||
write!(f, "{}", RESYNC_ERR)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Display for Error {
|
impl Display for Error {
|
||||||
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
|
fn fmt(&self, f: &mut Formatter) -> Result<(), FmtError> {
|
||||||
write!(f, "{}", RESYNC_ERR)
|
write!(f, "{}", RESYNC_ERR)
|
||||||
|
Loading…
Reference in New Issue
Block a user