EIP-86 fixes (#5506)

This commit is contained in:
Arkadiy Paronyan
2017-05-05 16:00:40 +02:00
committed by Gav Wood
parent 8b9adb4d74
commit ed7c366b90
9 changed files with 32 additions and 26 deletions

View File

@@ -48,6 +48,7 @@ use receipt::Receipt;
use snapshot::SnapshotComponents;
use spec::CommonParams;
use transaction::{UnverifiedTransaction, SignedTransaction};
use evm::CreateContractAddress;
use ethkey::Signature;
use util::*;
@@ -294,4 +295,9 @@ pub trait Engine : Sync + Send {
fn snapshot_components(&self) -> Option<Box<SnapshotComponents>> {
None
}
/// Returns new contract address generation scheme at given block number.
fn create_address_scheme(&self, number: BlockNumber) -> CreateContractAddress {
if number >= self.params().eip86_transition { CreateContractAddress::FromCodeHash } else { CreateContractAddress::FromSenderAndNonce }
}
}