Validate if gas limit is not zero (#8307)

This commit is contained in:
Andronik Ordian
2018-04-04 18:14:59 +03:00
committed by Marek Kotewicz
parent d57944ffb9
commit 811d165458
2 changed files with 4 additions and 3 deletions

View File

@@ -16,7 +16,7 @@
//! Spec genesis deserialization.
use uint::Uint;
use uint::{Uint, self};
use hash::{Address, H256};
use bytes::Bytes;
use spec::Seal;
@@ -37,6 +37,7 @@ pub struct Genesis {
pub parent_hash: Option<H256>,
/// Gas limit.
#[serde(rename="gasLimit")]
#[serde(deserialize_with="uint::validate_non_zero")]
pub gas_limit: Uint,
/// Transactions root.
#[serde(rename="transactionsRoot")]