Validate if gas limit is not zero (#8307)
This commit is contained in:
committed by
Marek Kotewicz
parent
d57944ffb9
commit
811d165458
@@ -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")]
|
||||
|
||||
Reference in New Issue
Block a user