poanetwork / hbbft

An implementation of the paper "Honey Badger of BFT Protocols" in Rust. This is a modular library of consensus.
Other
356 stars 96 forks source link

Change the `Target` variants for less cloning and less duplicated code. #408

Closed afck closed 5 years ago

afck commented 5 years ago

With #405, Target::All is somewhat redundant, since it is identical to Target::AllExcept(BTreeSet::new()).

Possibly we should also replace the Node variant with a Nodes(BTreeSet<N>), to avoid unnecessarily cloning messages.

And we should double-check whether BTreeSet is the right choice; often Vec is faster.