mirror of https://github.com/poanetwork/hbbft.git
fold was not using the variable capturing the sequential data; I fixed that
This commit is contained in:
parent
36cb880186
commit
92d8c0d71a
|
@ -284,13 +284,8 @@ impl<'a, HandlerError: AlgoError> MessageLoop<'a, HandlerError> {
|
|||
} => {
|
||||
self.remote_txs.iter().fold(result, |result1, (uid, tx)| {
|
||||
if result1.is_err() { result1 } else {
|
||||
if let Some(tx) = self.remote_txs.get(&uid) {
|
||||
tx.send(message.clone()).map_err(Error::from)
|
||||
}
|
||||
else {
|
||||
Err(Error::SendError)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}}
|
||||
|
|
|
@ -68,7 +68,7 @@ impl<'a> TestNode<'a>
|
|||
|
||||
pub fn run(&'a self) -> Result<HashSet<ProposedValue>, Error>
|
||||
{
|
||||
let node0_uid = "127.0.0.1:0".parse().unwrap();
|
||||
let node0_uid = node_addr(0);
|
||||
self.message_loop.insert_algo(Algorithm::Broadcast(node0_uid), self);
|
||||
|
||||
Err(Error::NotImplemented)
|
||||
|
|
Loading…
Reference in New Issue