Working test with block reward added

This commit is contained in:
Anton Gavrilov
2017-07-25 12:04:37 +02:00
parent 16f39487ba
commit 73128039a6
10 changed files with 192 additions and 13 deletions

View File

@@ -85,6 +85,8 @@ pub struct CommonParams {
pub remove_dust_contracts: bool,
/// Wasm support
pub wasm: bool,
/// Apply reward
pub apply_reward: bool,
}
impl CommonParams {
@@ -139,6 +141,7 @@ impl From<ethjson::spec::Params> for CommonParams {
nonce_cap_increment: p.nonce_cap_increment.map_or(64, Into::into),
remove_dust_contracts: p.remove_dust_contracts.unwrap_or(false),
wasm: p.wasm.unwrap_or(false),
apply_reward: p.apply_reward.unwrap_or(true),
}
}
}
@@ -446,6 +449,9 @@ impl Spec {
/// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus.
pub fn new_test() -> Spec { load_bundled!("null_morden") }
/// Create a new Spec which conforms to the Frontier-era Morden chain except that it's a NullEngine consensus with applying reward on block close.
pub fn new_test_with_reward() -> Spec { load_bundled!("null_morden_with_reward") }
/// Create a new Spec which is a NullEngine consensus with a premine of address whose secret is sha3('').
pub fn new_null() -> Spec { load_bundled!("null") }