Remove .expect()s for block and transaction, they might fail for writer reasons
This commit is contained in:
parent
e1f2eaa446
commit
dc18e8f24c
|
|
@ -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 => {}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue