make spec naming consistent
This commit is contained in:
parent
14a9942d14
commit
46662899da
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "TestAuthorityRound",
|
"name": "TestAuthorityRound",
|
||||||
"engine": {
|
"engine": {
|
||||||
"AuthorityRound": {
|
"authorityRound": {
|
||||||
"params": {
|
"params": {
|
||||||
"gasLimitBoundDivisor": "0x0400",
|
"gasLimitBoundDivisor": "0x0400",
|
||||||
"stepDuration": 1,
|
"stepDuration": 1,
|
||||||
@ -21,7 +21,7 @@
|
|||||||
},
|
},
|
||||||
"genesis": {
|
"genesis": {
|
||||||
"seal": {
|
"seal": {
|
||||||
"authority_round": {
|
"authorityRound": {
|
||||||
"step": "0x0",
|
"step": "0x0",
|
||||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "TestBasicAuthority",
|
"name": "TestBasicAuthority",
|
||||||
"engine": {
|
"engine": {
|
||||||
"BasicAuthority": {
|
"basicAuthority": {
|
||||||
"params": {
|
"params": {
|
||||||
"gasLimitBoundDivisor": "0x0400",
|
"gasLimitBoundDivisor": "0x0400",
|
||||||
"durationLimit": "0x0d",
|
"durationLimit": "0x0d",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "DevelopmentChain",
|
"name": "DevelopmentChain",
|
||||||
"engine": {
|
"engine": {
|
||||||
"InstantSeal": null
|
"instantSeal": null
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"accountStartNonce": "0x0",
|
"accountStartNonce": "0x0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Morden",
|
"name": "Morden",
|
||||||
"engine": {
|
"engine": {
|
||||||
"Null": null
|
"null": null
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"accountStartNonce": "0x0",
|
"accountStartNonce": "0x0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "Morden",
|
"name": "Morden",
|
||||||
"engine": {
|
"engine": {
|
||||||
"Null": null
|
"null": null
|
||||||
},
|
},
|
||||||
"params": {
|
"params": {
|
||||||
"accountStartNonce": "0x0",
|
"accountStartNonce": "0x0",
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "TestBFT",
|
"name": "TestBFT",
|
||||||
"engine": {
|
"engine": {
|
||||||
"Tendermint": {
|
"tendermint": {
|
||||||
"params": {
|
"params": {
|
||||||
"gasLimitBoundDivisor": "0x0400",
|
"gasLimitBoundDivisor": "0x0400",
|
||||||
"authorities" : [
|
"authorities" : [
|
||||||
|
@ -25,16 +25,21 @@ use spec::Tendermint;
|
|||||||
#[derive(Debug, PartialEq, Deserialize)]
|
#[derive(Debug, PartialEq, Deserialize)]
|
||||||
pub enum Engine {
|
pub enum Engine {
|
||||||
/// Null engine.
|
/// Null engine.
|
||||||
|
#[serde(rename="null")]
|
||||||
Null,
|
Null,
|
||||||
/// Instantly sealing engine.
|
/// Instantly sealing engine.
|
||||||
|
#[serde(rename="instantSeal")]
|
||||||
InstantSeal,
|
InstantSeal,
|
||||||
/// Ethash engine.
|
/// Ethash engine.
|
||||||
Ethash(Ethash),
|
Ethash(Ethash),
|
||||||
/// BasicAuthority engine.
|
/// BasicAuthority engine.
|
||||||
|
#[serde(rename="basicAuthority")]
|
||||||
BasicAuthority(BasicAuthority),
|
BasicAuthority(BasicAuthority),
|
||||||
/// AuthorityRound engine.
|
/// AuthorityRound engine.
|
||||||
|
#[serde(rename="authorityRound")]
|
||||||
AuthorityRound(AuthorityRound),
|
AuthorityRound(AuthorityRound),
|
||||||
/// Tendermint engine.
|
/// Tendermint engine.
|
||||||
|
#[serde(rename="tendermint")]
|
||||||
Tendermint(Tendermint)
|
Tendermint(Tendermint)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -46,14 +51,14 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn engine_deserialization() {
|
fn engine_deserialization() {
|
||||||
let s = r#"{
|
let s = r#"{
|
||||||
"Null": null
|
"null": null
|
||||||
}"#;
|
}"#;
|
||||||
|
|
||||||
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
||||||
assert_eq!(Engine::Null, deserialized);
|
assert_eq!(Engine::Null, deserialized);
|
||||||
|
|
||||||
let s = r#"{
|
let s = r#"{
|
||||||
"InstantSeal": null
|
"instantSeal": null
|
||||||
}"#;
|
}"#;
|
||||||
|
|
||||||
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
let deserialized: Engine = serde_json::from_str(s).unwrap();
|
||||||
|
@ -57,7 +57,7 @@ pub enum Seal {
|
|||||||
#[serde(rename="ethereum")]
|
#[serde(rename="ethereum")]
|
||||||
Ethereum(Ethereum),
|
Ethereum(Ethereum),
|
||||||
/// AuthorityRound seal.
|
/// AuthorityRound seal.
|
||||||
#[serde(rename="authority_round")]
|
#[serde(rename="authorityRound")]
|
||||||
AuthorityRound(AuthorityRoundSeal),
|
AuthorityRound(AuthorityRoundSeal),
|
||||||
/// Tendermint seal.
|
/// Tendermint seal.
|
||||||
#[serde(rename="tendermint")]
|
#[serde(rename="tendermint")]
|
||||||
@ -82,7 +82,7 @@ mod tests {
|
|||||||
},{
|
},{
|
||||||
"generic": "0xe011bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"
|
"generic": "0xe011bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"
|
||||||
},{
|
},{
|
||||||
"authority_round": {
|
"authorityRound": {
|
||||||
"step": "0x0",
|
"step": "0x0",
|
||||||
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user