Skip to content
Snippets Groups Projects
Commit 46b31eb5 authored by Joseph Goulden's avatar Joseph Goulden
Browse files

chore: add missing ? for Results after review

parent 468473e5
Branches
No related merge requests found
......@@ -107,8 +107,8 @@ impl DisplayLayout for Private {
impl fmt::Debug for Private {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
writeln!(f, "network: {:?}", self.network);
writeln!(f, "secret: {}", self.secret.to_hex::<String>());
writeln!(f, "network: {:?}", self.network)?;
writeln!(f, "secret: {}", self.secret.to_hex::<String>())?;
writeln!(f, "compressed: {}", self.compressed)
}
}
......
......@@ -230,7 +230,7 @@ impl Deserializable for Bytes {
fn deserialize<T>(reader: &mut Reader<T>) -> Result<Self, Error> where T: io::Read {
let len = reader.read::<CompactInteger>()?;
let mut bytes = Bytes::new_with_len(len.into());
reader.read_slice(&mut bytes);
reader.read_slice(&mut bytes)?;
Ok(bytes)
}
}
......
......@@ -65,9 +65,9 @@ impl<'a> ChainAcceptor<'a> {
}
pub fn check(&self) -> Result<(), Error> {
self.block.check();
self.header.check();
self.check_transactions();
self.block.check()?;
self.header.check()?;
self.check_transactions()?;
Ok(())
}
......
......@@ -29,9 +29,9 @@ impl<'a> HeaderAcceptor<'a> {
}
pub fn check(&self) -> Result<(), Error> {
self.version.check();
self.work.check();
self.median_timestamp.check();
self.version.check()?;
self.work.check()?;
self.median_timestamp.check()?;
Ok(())
}
}
......
......@@ -114,14 +114,14 @@ impl<'a> MemoryPoolTransactionAcceptor<'a> {
pub fn check(&self) -> Result<(), TransactionError> {
// Bip30 is not checked because we don't need to allow tx pool acceptance of an unspent duplicate.
// Tx pool validation is not strinctly a matter of consensus.
self.size.check();
self.missing_inputs.check();
self.maturity.check();
self.overspent.check();
self.sigops.check();
self.double_spent.check();
self.return_replay_protection.check();
self.eval.check();
self.size.check()?;
self.missing_inputs.check()?;
self.maturity.check()?;
self.overspent.check()?;
self.sigops.check()?;
self.double_spent.check()?;
self.return_replay_protection.check()?;
self.eval.check()?;
Ok(())
}
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment