make fields defaulting to 0 optional
This commit is contained in:
@@ -28,13 +28,13 @@ pub struct Genesis {
|
||||
pub seal: Seal,
|
||||
/// Difficulty.
|
||||
pub difficulty: Uint,
|
||||
/// Block author.
|
||||
pub author: Address,
|
||||
/// Block timestamp.
|
||||
pub timestamp: Uint,
|
||||
/// Parent hash.
|
||||
/// Block author, defaults to 0.
|
||||
pub author: Option<Address>,
|
||||
/// Block timestamp, defaults to 0.
|
||||
pub timestamp: Option<Uint>,
|
||||
/// Parent hash, defaults to 0.
|
||||
#[serde(rename="parentHash")]
|
||||
pub parent_hash: H256,
|
||||
pub parent_hash: Option<H256>,
|
||||
/// Gas limit.
|
||||
#[serde(rename="gasLimit")]
|
||||
pub gas_limit: Uint,
|
||||
|
||||
@@ -22,9 +22,9 @@ use hash::H256;
|
||||
/// Spec params.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
pub struct Params {
|
||||
/// Account start nonce.
|
||||
/// Account start nonce, defaults to 0.
|
||||
#[serde(rename="accountStartNonce")]
|
||||
pub account_start_nonce: Uint,
|
||||
pub account_start_nonce: Option<Uint>,
|
||||
/// Maximum size of extra data.
|
||||
#[serde(rename="maximumExtraDataSize")]
|
||||
pub maximum_extra_data_size: Uint,
|
||||
|
||||
Reference in New Issue
Block a user