Disconnect peers on a fork (#1738)

This commit is contained in:
Arkadiy Paronyan
2016-07-27 21:38:22 +02:00
committed by Gav Wood
parent eaa41ea568
commit 6b1e722a6b
10 changed files with 122 additions and 16 deletions

View File

@@ -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)]

View File

@@ -79,6 +79,8 @@ mod tests {
"maximumExtraDataSize": "0x20",
"minGasLimit": "0x1388",
"networkID" : "0x2"
"forkBlock": "0xffffffffffffffff",
"forkCanonHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
},
"genesis": {
"seal": {