Remove .expect()s for block and transaction, they might fail for writer reasons

This commit is contained in:
Deirdre Connolly 2019-10-09 22:16:13 -04:00 committed by Deirdre Connolly
parent e1f2eaa446
commit dc18e8f24c
1 changed files with 2 additions and 6 deletions

View File

@ -211,9 +211,7 @@ impl Codec {
ref block, ref block,
} => { } => {
writer.write_u32::<LittleEndian>(version.0)?; writer.write_u32::<LittleEndian>(version.0)?;
block block.zcash_serialize(&mut writer)?
.zcash_serialize(&mut writer)
.expect("Blocks must serialize.");
} }
GetBlocks { GetBlocks {
ref version, ref version,
@ -268,9 +266,7 @@ impl Codec {
ref transaction, ref transaction,
} => { } => {
writer.write_u32::<LittleEndian>(version.0)?; writer.write_u32::<LittleEndian>(version.0)?;
transaction transaction.zcash_serialize(&mut writer)?
.zcash_serialize(&mut writer)
.expect("Transactions must serialize.");
} }
// Mempool => {} // Mempool => {}
// FilterLoad => {} // FilterLoad => {}