Support millisecond timestamp for instant seal engine (#9469)
* Support millisecond timestamp for instant seal engine * Forgot to checkin instant_seal mod * Fix instant seal config * Fix json crate compile * Fix private_spec.json * Option<bool> -> bool
This commit is contained in:
committed by
Andronik Ordian
parent
39a12622ae
commit
5752869824
@@ -16,7 +16,7 @@
|
||||
|
||||
//! Engine deserialization.
|
||||
|
||||
use super::{Ethash, BasicAuthority, AuthorityRound, Tendermint, NullEngine};
|
||||
use super::{Ethash, BasicAuthority, AuthorityRound, Tendermint, NullEngine, InstantSeal};
|
||||
|
||||
/// Engine deserialization.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
@@ -26,7 +26,7 @@ pub enum Engine {
|
||||
Null(NullEngine),
|
||||
/// Instantly sealing engine.
|
||||
#[serde(rename="instantSeal")]
|
||||
InstantSeal,
|
||||
InstantSeal(InstantSeal),
|
||||
/// Ethash engine.
|
||||
Ethash(Ethash),
|
||||
/// BasicAuthority engine.
|
||||
@@ -62,12 +62,12 @@ mod tests {
|
||||
}
|
||||
|
||||
let s = r#"{
|
||||
"instantSeal": null
|
||||
"instantSeal": {"params": {}}
|
||||
}"#;
|
||||
|
||||
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
||||
match deserialized {
|
||||
Engine::InstantSeal => {}, // instant seal is unit tested in its own file.
|
||||
Engine::InstantSeal(_) => {}, // instant seal is unit tested in its own file.
|
||||
_ => panic!(),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user