openethereum/ethcore
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
..
benches misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
blockchain Reset blockchain properly (#10669) 2019-05-21 13:52:48 +02:00
call-contract Extract CallContract and RegistryInfo traits into their own crate (#10178) 2019-01-16 19:52:21 +01:00
db misc: bump license header to 2019 (#10135) 2019-01-07 11:33:07 +01:00
evm evm: add some mulmod benches (#10600) 2019-04-29 12:09:23 +02:00
light [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
node-filter Remove annoying compiler warnings (#10679) 2019-05-21 16:12:49 +01:00
private-tx Trivial journal for private transactions (#10056) 2019-05-14 11:21:21 +02:00
res Fix rinkeby petersburg fork (#10632) 2019-05-09 15:28:30 +02:00
service private-tx: replace error_chain (#10510) 2019-03-27 14:46:05 +01:00
src Fix compiler warning (that will become an error) (#10683) 2019-05-23 17:37:12 +02:00
sync Remove annoying compiler warnings (#10679) 2019-05-21 16:12:49 +01:00
types Remove annoying compiler warnings (#10679) 2019-05-21 16:12:49 +01:00
vm Update to latest mem-db, hash-db and trie-db. (#10314) 2019-02-20 21:09:34 +03:00
wasm Replace ethcore-logger with env-logger. (#10102) 2019-01-08 15:07:20 +01:00
Cargo.toml [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00