diff --git a/CHANGELOG.md b/CHANGELOG.md index c4d2832eff..8a3b805c32 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,12 @@ The project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html) - `storage::base_index` module has become private along with `BaseIndex` and `BaseIndexIter` types. (#723) +### Bug fixes + +#### exonum + +- Fixed bug with incorrect peer status for turned off node. (#730) + ## 0.8 - 2018-05-31 ### Breaking changes diff --git a/exonum/src/blockchain/service.rs b/exonum/src/blockchain/service.rs index bf6fe59c92..dedf8c7495 100644 --- a/exonum/src/blockchain/service.rs +++ b/exonum/src/blockchain/service.rs @@ -395,6 +395,12 @@ impl SharedNodeState { } /// Updates internal state, from `State` of a blockchain node. pub fn update_node_state(&self, state: &State) { + self.state + .write() + .expect("Expected write lock.") + .peers_info + .clear(); + for (p, c) in state.peers().iter() { self.state .write()