parallelchain-io / hotstuff_rs

Rust implementation of the HotStuff consensus algorithm.
39 stars 5 forks source link

`blocks_iter` in `commit_block` ignores `BlockTreeError`s #40

Closed lyulka closed 2 months ago

lyulka commented 3 months ago

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?

_Originally posted by @lyulka in https://github.com/parallelchain-io/hotstuff_rs/pull/36#discussion_r1604889960_

lyulka commented 2 months ago

Closing. This issue will henceforth be tracked by issue no. 44.