Errors & warnings for inappropriate RPCs (#6029)

* Clarify function name

Function checks if sealing is currently underway, not to be confused
with checking whether the engine performs internal sealing.

* Error when work called on internal sealing engine

* Error submitting work for internal sealing engine

* Fix inverted bool and style grumbles

* Add can_produce_work_package to TestMinerService

* Error when setting engine signer on PoW chain

* Unit tests for engine signing

Setting engine signer should fail if chain does not seal internally
or client lacks account provider.

* Tweak TestMinerService

* Fix minor style grumbles
This commit is contained in:
Joseph Mark
2017-07-12 13:52:18 +07:00
committed by Gav Wood
parent 02f2c611d4
commit 0fca4f95d6
8 changed files with 75 additions and 13 deletions

View File

@@ -451,6 +451,9 @@ impl Spec {
/// Create a new Spec with BasicAuthority which uses multiple validator sets changing with height.
/// Account with secrets "0".sha3() is the validator for block 1 and with "1".sha3() onwards.
pub fn new_validator_multi() -> Self { load_bundled!("validator_multi") }
/// Create a new spec for a PoW chain
pub fn new_pow_test_spec() -> Self { load_bundled!("ethereum/olympic") }
}
#[cfg(test)]