set CHAIN_ID for Classic (#3934)

* configurable CHAIN_ID

* set CHAIN_ID for Ethereum Classic
This commit is contained in:
Igor Artamonov
2016-12-22 18:10:58 +06:00
committed by Gav Wood
parent b44cd7b1db
commit be75cbfaaa
5 changed files with 12 additions and 2 deletions

View File

@@ -167,7 +167,7 @@ impl Engine for Ethash {
fn signing_network_id(&self, env_info: &EnvInfo) -> Option<u64> {
if env_info.number >= self.ethash_params.eip155_transition {
Some(self.params().network_id)
Some(self.params().chain_id)
} else {
None
}
@@ -316,7 +316,7 @@ impl Engine for Ethash {
}
if let Some(n) = t.network_id() {
if header.number() < self.ethash_params.eip155_transition || n != self.params().network_id {
if header.number() < self.ethash_params.eip155_transition || n != self.params().chain_id {
return Err(TransactionError::InvalidNetworkId.into())
}
}