Open AgustinCB opened 5 years ago
Instead of having a HashMap<PeerId, Peer> in every consensus protocol with methods to choose peers randomly, lets create a Network structure with that map, that implements the trait IteratorRandom and use that everywhere.
HashMap<PeerId, Peer>
Network
IteratorRandom
Instead of having a
HashMap<PeerId, Peer>
in every consensus protocol with methods to choose peers randomly, lets create aNetwork
structure with that map, that implements the traitIteratorRandom
and use that everywhere.