Disconnect peers on a fork (#1738)
This commit is contained in:
committed by
Gav Wood
parent
eaa41ea568
commit
6b1e722a6b
@@ -17,6 +17,7 @@
|
||||
//! Spec params deserialization.
|
||||
|
||||
use uint::Uint;
|
||||
use hash::H256;
|
||||
|
||||
/// Spec params.
|
||||
#[derive(Debug, PartialEq, Deserialize)]
|
||||
@@ -33,6 +34,12 @@ pub struct Params {
|
||||
/// Minimum gas limit.
|
||||
#[serde(rename="minGasLimit")]
|
||||
pub min_gas_limit: Uint,
|
||||
/// Option fork block number to check.
|
||||
#[serde(rename="forkBlock")]
|
||||
pub fork_block: Option<Uint>,
|
||||
/// Expected fork block hash.
|
||||
#[serde(rename="forkCanonHash")]
|
||||
pub fork_hash: Option<H256>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
@@ -79,6 +79,8 @@ mod tests {
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
"networkID" : "0x2"
|
||||
"forkBlock": "0xffffffffffffffff",
|
||||
"forkCanonHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
||||
},
|
||||
"genesis": {
|
||||
"seal": {
|
||||
|
||||
Reference in New Issue
Block a user