Skip to content

Commit

Permalink
Fix incorrect peer status for turned off node [ECR-1370] (exonum#730)
Browse files Browse the repository at this point in the history
  • Loading branch information
Serhii Oryshych authored and stanislav-tkach committed Jun 7, 2018
1 parent c68431a commit 1965f75
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions exonum/src/blockchain/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 1965f75

Please sign in to comment.