Instant sealing engine (#1767)
* add an instant sealing engine * add sealing engine tests * rename to InstantSeal * update name in json * whitespace [ci:skip]
This commit is contained in:
@@ -24,6 +24,8 @@ use spec::BasicAuthority;
|
||||
pub enum Engine {
|
||||
/// Null engine.
|
||||
Null,
|
||||
/// Instantly sealing engine.
|
||||
InstantSeal,
|
||||
/// Ethash engine.
|
||||
Ethash(Ethash),
|
||||
/// BasicAuthority engine.
|
||||
@@ -44,6 +46,14 @@ mod tests {
|
||||
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
||||
assert_eq!(Engine::Null, deserialized);
|
||||
|
||||
let s = r#"{
|
||||
"InstantSeal": null
|
||||
}"#;
|
||||
|
||||
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
||||
assert_eq!(Engine::InstantSeal, deserialized);
|
||||
|
||||
|
||||
let s = r#"{
|
||||
"Ethash": {
|
||||
"params": {
|
||||
|
||||
Reference in New Issue
Block a user