openethereum/ethcore/src/engines/clique
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
..
block_state.rs ethcore: add clique engine (#9981) 2019-03-27 14:13:24 +01:00
mod.rs Fix compiler warning (that will become an error) (#10683) 2019-05-23 17:37:12 +02:00
params.rs ethcore: add clique engine (#9981) 2019-03-27 14:13:24 +01:00
step_service.rs Fix compiler warning (that will become an error) (#10683) 2019-05-23 17:37:12 +02:00
tests.rs [ethcore] remove error_chain (#10616) 2019-05-06 15:06:20 +02:00
util.rs ethcore: add clique engine (#9981) 2019-03-27 14:13:24 +01:00