openethereum/ethcore/src
David 752031a657
Fix compiler warning (that will become an error) (#10683)
* Remove annoying compiler warnings

* Fix compiler warning (that will become an error)

Fixes https://github.com/paritytech/parity-ethereum/issues/10648

I'm not sure this fix is Good™ but rustc seems happy enough.

There's a deeper issue which may or may not be related to this: the Engine is not shutdown properly and the `StepService` thread keeps running indefinitely after Ctrl-C (so `update_sealing()` is called repeatedly for 300sec). I don't think this is related to Clique as I've seen this happen on mainnet as well, but I wonder if the effects of it are worse for a PoA network where the node can create new blocks all on its own?

* Use saturating_sub

* WIP

* Fix warning, second attempt

The idea here is to avoid using `Arc::get_mut()` (which does not work: fails every time here) and instead trust `drop()` to do the right thing.

This is a conservative change. I think this can be reformed further, e.g. by `impl Drop for StepService` and halt the thread there, or even skip `join()`ing the thread entirely and trust the `AtomicBool` to signal shutdown. I also have doubts abut the `Option<StepService>`: seems a bit much to have an `Option` there and it makes things cumbersome.
2019-05-23 17:37:12 +02:00
..
client Fix compiler warning (that will become an error) (#10683) 2019-05-23 17:37:12 +02:00
engines Fix compiler warning (that will become an error) (#10683) 2019-05-23 17:37:12 +02:00
ethereum fix(compilation warnings) (#10649) 2019-05-13 15:10:25 +02:00
json_tests Refactor ethcore::client::TransactResult to use it inside std::result::Result (#10366) 2019-02-26 13:49:33 +01:00
machine simplify block module and usage (#10479) 2019-03-15 12:22:47 +00:00
miner [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
snapshot [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
spec Remove annoying compiler warnings (#10679) 2019-05-21 16:12:49 +01:00
state perf(ethcore): micro-opt (#10405) 2019-03-06 15:30:35 +01:00
tests Reset blockchain properly (#10669) 2019-05-21 13:52:48 +02:00
trace simplify parity machine (#10469) 2019-03-13 11:36:13 +01:00
verification [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
account_db.rs Update to latest mem-db, hash-db and trie-db. (#10314) 2019-02-20 21:09:34 +03:00
block.rs fix issue with compilation when 'slow-blocks' feature enabled (#10585) 2019-04-11 11:02:39 +01:00
builtin.rs misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
error.rs [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
executed.rs Add trace information to eth_estimateGas (#10519) 2019-03-27 14:21:08 +01:00
executive.rs Additional error for invalid gas (#10327) 2019-02-11 22:20:51 +00:00
externalities.rs perf(ethcore): micro-opt (#10405) 2019-03-06 15:30:35 +01:00
factory.rs misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
lib.rs [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
pod_account.rs Update to latest mem-db, hash-db and trie-db. (#10314) 2019-02-20 21:09:34 +03:00
pod_state.rs misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
state_db.rs Update to latest mem-db, hash-db and trie-db. (#10314) 2019-02-20 21:09:34 +03:00
test_helpers.rs OpenBlock::new take IntoIterator instead of mutable ref to Iterator (#10480) 2019-03-15 15:43:54 +01:00
transaction_ext.rs misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
tx_filter.rs Remove CallContract and RegistryInfo re-exports from ethcore/client (#10205) 2019-01-17 16:43:08 +01:00