Clean up serde rename and use rename_all = camelCase when possible (#9823)

* Clean up serde rename and use rename_all = camelCase when possible

* snake_case for pricing

* Use camelcase for engine

* Use camel case for seal

* Use camel case for validator set

* Use camel case for confirmation payload

* Use camel case for consensus status

* Use camel case for nodekind

* Use kebab case for provenance

* Use camel case for pubsub

* Use lowercase and camelcase for trace

* Use camel case for whisper

* rename Ethash as irregular name
This commit is contained in:
Wei Tang
2018-10-29 23:49:04 +08:00
committed by GitHub
parent f8f8bf0fea
commit 05be4b5b0e
50 changed files with 140 additions and 311 deletions

View File

@@ -38,11 +38,11 @@ pub enum ForkSpec {
/// Spec deserialization.
#[derive(Debug, PartialEq, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct Spec {
/// Spec name.
pub name: String,
/// Special fork name.
#[serde(rename="dataDir")]
pub data_dir: Option<String>,
/// Engine.
pub engine: Engine,
@@ -55,7 +55,6 @@ pub struct Spec {
/// Boot nodes.
pub nodes: Option<Vec<String>>,
/// Hardcoded synchronization for the light client.
#[serde(rename="hardcodedSync")]
pub hardcoded_sync: Option<HardcodedSync>,
}