make spec naming consistent

This commit is contained in:
keorn 2016-12-19 14:15:39 +01:00
parent 14a9942d14
commit 46662899da
8 changed files with 16 additions and 11 deletions

View File

@ -1,7 +1,7 @@
{
"name": "TestAuthorityRound",
"engine": {
"AuthorityRound": {
"authorityRound": {
"params": {
"gasLimitBoundDivisor": "0x0400",
"stepDuration": 1,
@ -21,7 +21,7 @@
},
"genesis": {
"seal": {
"authority_round": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}

View File

@ -1,7 +1,7 @@
{
"name": "TestBasicAuthority",
"engine": {
"BasicAuthority": {
"basicAuthority": {
"params": {
"gasLimitBoundDivisor": "0x0400",
"durationLimit": "0x0d",

View File

@ -1,7 +1,7 @@
{
"name": "DevelopmentChain",
"engine": {
"InstantSeal": null
"instantSeal": null
},
"params": {
"accountStartNonce": "0x0",

View File

@ -1,7 +1,7 @@
{
"name": "Morden",
"engine": {
"Null": null
"null": null
},
"params": {
"accountStartNonce": "0x0",

View File

@ -1,7 +1,7 @@
{
"name": "Morden",
"engine": {
"Null": null
"null": null
},
"params": {
"accountStartNonce": "0x0",

View File

@ -1,7 +1,7 @@
{
"name": "TestBFT",
"engine": {
"Tendermint": {
"tendermint": {
"params": {
"gasLimitBoundDivisor": "0x0400",
"authorities" : [

View File

@ -25,16 +25,21 @@ use spec::Tendermint;
#[derive(Debug, PartialEq, Deserialize)]
pub enum Engine {
/// Null engine.
#[serde(rename="null")]
Null,
/// Instantly sealing engine.
#[serde(rename="instantSeal")]
InstantSeal,
/// Ethash engine.
Ethash(Ethash),
/// BasicAuthority engine.
#[serde(rename="basicAuthority")]
BasicAuthority(BasicAuthority),
/// AuthorityRound engine.
#[serde(rename="authorityRound")]
AuthorityRound(AuthorityRound),
/// Tendermint engine.
#[serde(rename="tendermint")]
Tendermint(Tendermint)
}
@ -46,14 +51,14 @@ mod tests {
#[test]
fn engine_deserialization() {
let s = r#"{
"Null": null
"null": null
}"#;
let deserialized: Engine = serde_json::from_str(s).unwrap();
assert_eq!(Engine::Null, deserialized);
let s = r#"{
"InstantSeal": null
"instantSeal": null
}"#;
let deserialized: Engine = serde_json::from_str(s).unwrap();

View File

@ -57,7 +57,7 @@ pub enum Seal {
#[serde(rename="ethereum")]
Ethereum(Ethereum),
/// AuthorityRound seal.
#[serde(rename="authority_round")]
#[serde(rename="authorityRound")]
AuthorityRound(AuthorityRoundSeal),
/// Tendermint seal.
#[serde(rename="tendermint")]
@ -82,7 +82,7 @@ mod tests {
},{
"generic": "0xe011bbe8db4e347b4e8c937c1c8370e4b5ed33adb3db69cbdb7a38e1e50b1b82fa"
},{
"authority_round": {
"authorityRound": {
"step": "0x0",
"signature": "0x0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
}