Fix a deadlock (#9952)

* Update informant:
  - decimal in Mgas/s
  - print every 5s (not randomly between 5s and 10s)

* Fix dead-lock in `blockchain.rs`

* Update locks ordering
This commit is contained in:
Nicolas Gotchac
2018-11-25 08:53:41 +01:00
committed by Wei Tang
parent 1fdfa1e6c6
commit f20f4c74d2
2 changed files with 6 additions and 8 deletions

View File

@@ -1187,8 +1187,8 @@ impl BlockChain {
let mut pending_block_details = self.pending_block_details.write();
let mut pending_write_txs = self.pending_transaction_addresses.write();
let mut best_ancient_block = self.best_ancient_block.write();
let mut best_block = self.best_block.write();
let mut best_ancient_block = self.best_ancient_block.write();
let mut write_block_details = self.block_details.write();
let mut write_hashes = self.block_hashes.write();
let mut write_txs = self.transaction_addresses.write();