make spec naming consistent
This commit is contained in:
parent
14a9942d14
commit
46662899da
@ -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"
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "TestBasicAuthority",
|
||||
"engine": {
|
||||
"BasicAuthority": {
|
||||
"basicAuthority": {
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"durationLimit": "0x0d",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "DevelopmentChain",
|
||||
"engine": {
|
||||
"InstantSeal": null
|
||||
"instantSeal": null
|
||||
},
|
||||
"params": {
|
||||
"accountStartNonce": "0x0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Morden",
|
||||
"engine": {
|
||||
"Null": null
|
||||
"null": null
|
||||
},
|
||||
"params": {
|
||||
"accountStartNonce": "0x0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Morden",
|
||||
"engine": {
|
||||
"Null": null
|
||||
"null": null
|
||||
},
|
||||
"params": {
|
||||
"accountStartNonce": "0x0",
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "TestBFT",
|
||||
"engine": {
|
||||
"Tendermint": {
|
||||
"tendermint": {
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"authorities" : [
|
||||
|
@ -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();
|
||||
|
@ -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"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user