Backports into beta (#2512)

* RocksDB version bump

* Preserve cache on reverting the snapshot (#2488)

* Preserve cache on reverting the snapshot

* Renamed merge_with into replace_with

* Renamed and documented snapshotting methods

* Track dirty accounts in the state (#2461)

* State to track dirty accounts

* Removed clone_for_snapshot

* Renaming stuff

* Documentation and other minor fixes

* Replaced MaybeAccount with Option

* Adjustable stack size for EVM (#2483)

* stack size for io workers & evm threshold

* rust way to remember stack size

* right value

* 24kb size

* some stack reduction

* Fixed overflow panic in handshake_panic (#2495)
This commit is contained in:
Arkadiy Paronyan
2016-10-07 11:49:48 +02:00
committed by Gav Wood
parent 9cf777510f
commit bbaf5ed4f5
8 changed files with 237 additions and 173 deletions

View File

@@ -580,7 +580,8 @@ impl Host {
}
fn handshake_count(&self) -> usize {
self.sessions.read().count() - self.session_count()
// session_count < total_count is possible because of the data race.
self.sessions.read().count().saturating_sub(self.session_count())
}
fn keep_alive(&self, io: &IoContext<NetworkIoMessage>) {