tx-pool: where did those spaces come from
This commit is contained in:
parent
07f5176650
commit
7d8a77a322
|
@ -22,7 +22,7 @@ pub enum Error<Hash: fmt::Debug + fmt::LowerHex> {
|
|||
/// Transaction is already imported
|
||||
AlreadyImported(Hash),
|
||||
/// Transaction is too cheap to enter the queue
|
||||
TooCheapToEnter (Hash, String),
|
||||
TooCheapToEnter(Hash, String),
|
||||
/// Transaction is too cheap to replace existing transaction that occupies the same slot.
|
||||
TooCheapToReplace (Hash, Hash),
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ impl<H: fmt::Debug + fmt::LowerHex> fmt::Display for Error<H> {
|
|||
Error::TooCheapToReplace(old_hash, hash) =>
|
||||
write!(f, "[{:x}] too cheap to replace: {:x}", hash, old_hash),
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<H: fmt::Debug + fmt::LowerHex> error::Error for Error<H> {}
|
||||
|
@ -52,8 +52,8 @@ impl<H: fmt::Debug + fmt::LowerHex> PartialEq for Error<H> where H: PartialEq {
|
|||
|
||||
match (self, other) {
|
||||
(&AlreadyImported(ref h1), &AlreadyImported(ref h2)) => h1 == h2,
|
||||
(&TooCheapToEnter(ref h1, ref s1 ), &TooCheapToEnter (ref h2, ref s2)) => h1 == h2 && s1 == s2,
|
||||
(&TooCheapToReplace (ref old1, ref new1), &TooCheapToReplace (ref old2, ref new2)) => old1 == old2 && new1 == new2,
|
||||
(&TooCheapToEnter(ref h1, ref s1), &TooCheapToEnter (ref h2, ref s2)) => h1 == h2 && s1 == s2,
|
||||
(&TooCheapToReplace(ref old1, ref new1), &TooCheapToReplace (ref old2, ref new2)) => old1 == old2 && new1 == new2,
|
||||
_ => false,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue