This.ok() quietly turns the Result returned from block_justify into an Option, essentially ignoring it.
Did you consider any better ways to handle coming across a BlockTreeError while evaluating this closure? E.g., maybe having the iterator be over Result<CryptoHash, BlockTreeError> and panicking when the iterator is consumed if we come across a BlockTreeError?
This
.ok()
quietly turns the Result returned fromblock_justify
into an Option, essentially ignoring it.Did you consider any better ways to handle coming across a
BlockTreeError
while evaluating this closure? E.g., maybe having the iterator be overResult<CryptoHash, BlockTreeError>
and panicking when the iterator is consumed if we come across aBlockTreeError
?_Originally posted by @lyulka in https://github.com/parallelchain-io/hotstuff_rs/pull/36#discussion_r1604889960_