Apply suggestions from code review

Co-authored-by: Daira Emma Hopwood <daira@jacaranda.org>
This commit is contained in:
Kris Nuttycombe 2023-11-08 13:36:13 -07:00 committed by Kris Nuttycombe
parent 27f78d1894
commit ae4cb53c49
2 changed files with 6 additions and 6 deletions

View File

@ -439,14 +439,14 @@ impl BlockMetadata {
self.block_hash
}
/// Returns the size of the Sapling note commitment tree as of the end of the block that this
/// [`BlockMetadata`] describes.
/// Returns the size of the Sapling note commitment tree for the final treestate of the block
/// that this [`BlockMetadata`] describes.
pub fn sapling_tree_size(&self) -> Option<u32> {
self.sapling_tree_size
}
/// Returns the size of the Orchard note commitment tree as of the end of the block that this
/// [`BlockMetadata`] describes.
/// Returns the size of the Orchard note commitment tree for the final treestate of the block
/// that this [`BlockMetadata`] describes.
pub fn orchard_tree_size(&self) -> Option<u32> {
self.orchard_tree_size
}

View File

@ -362,7 +362,7 @@ where
s + u32::try_from(
block.vtx.iter().map(|tx| tx.outputs.len()).sum::<usize>(),
)
.unwrap()
.expect("count of Sapling outputs in a block cannot exceed a u32")
})
}),
block
@ -374,7 +374,7 @@ where
s + u32::try_from(
block.vtx.iter().map(|tx| tx.actions.len()).sum::<usize>(),
)
.unwrap()
.expect("count of Orchard actions in a block cannot exceed a u32")
})
}),
)