Fixed comments after review and test after rebase
This commit is contained in:
parent
8826fdb03a
commit
141c2fd34a
@ -4,6 +4,7 @@
|
||||
"null": null
|
||||
},
|
||||
"params": {
|
||||
"gasLimitBoundDivisor": "0x0400",
|
||||
"accountStartNonce": "0x0",
|
||||
"maximumExtraDataSize": "0x20",
|
||||
"minGasLimit": "0x1388",
|
||||
|
@ -206,7 +206,7 @@ pub trait IsBlock {
|
||||
fn uncles(&self) -> &[Header] { &self.block().uncles }
|
||||
|
||||
/// Get tracing enabled flag for this block.
|
||||
fn tracing_enabled(&self) -> &bool { &self.block().tracing_enabled }
|
||||
fn tracing_enabled(&self) -> bool { self.block().tracing_enabled }
|
||||
}
|
||||
|
||||
/// Trait for a object that has a state database.
|
||||
|
@ -555,7 +555,7 @@ impl Engine for AuthorityRound {
|
||||
|
||||
// Trace it
|
||||
let block_miner = fields.header.author().clone();
|
||||
tracer.trace_reward(block_miner, self.block_reward, RewardType::Block);
|
||||
tracer.trace_reward(block_miner, self.params().block_reward, RewardType::Block);
|
||||
|
||||
// Commit state so that we can actually figure out the state root.
|
||||
if let Err(ref e) = res {
|
||||
|
@ -17,8 +17,8 @@
|
||||
use std::collections::BTreeMap;
|
||||
use util::Address;
|
||||
use builtin::Builtin;
|
||||
use block::*;
|
||||
use util::*;
|
||||
use block::{ExecutedBlock, };
|
||||
use util::U256;
|
||||
use engines::{Engine, CloseOutcome};
|
||||
use spec::CommonParams;
|
||||
use evm::Schedule;
|
||||
|
@ -550,7 +550,7 @@ impl Engine for Tendermint {
|
||||
|
||||
// Trace it
|
||||
let block_miner = fields.header.author().clone();
|
||||
tracer.trace_reward(block_miner, self.block_reward, RewardType::Block);
|
||||
tracer.trace_reward(block_miner, self.params().block_reward, RewardType::Block);
|
||||
|
||||
// Commit state so that we can actually figure out the state root.
|
||||
if let Err(ref e) = res {
|
||||
|
@ -301,14 +301,14 @@ impl Engine for Arc<Ethash> {
|
||||
result_uncle_reward = reward * U256::from(8 + u.number() - current_number) / U256::from(8);
|
||||
fields.state.add_balance(
|
||||
u.author(),
|
||||
&(result_uncle_reward),
|
||||
&result_uncle_reward,
|
||||
CleanupMode::NoEmpty
|
||||
)
|
||||
} else {
|
||||
result_uncle_reward = reward / U256::from(32);
|
||||
fields.state.add_balance(
|
||||
u.author(),
|
||||
&(result_uncle_reward),
|
||||
&result_uncle_reward,
|
||||
CleanupMode::NoEmpty
|
||||
)
|
||||
}?;
|
||||
|
@ -168,17 +168,10 @@ 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),
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
gas_limit_bound_divisor: p.gas_limit_bound_divisor.into(),
|
||||
block_reward: p.block_reward.map_or_else(U256::zero, Into::into),
|
||||
registrar: p.registrar.map_or_else(Address::new, Into::into),
|
||||
=======
|
||||
apply_reward: p.apply_reward.unwrap_or(true),
|
||||
>>>>>>> 7312803... Working test with block reward added
|
||||
=======
|
||||
apply_reward: p.apply_reward.unwrap_or(true),
|
||||
>>>>>>> bb043ba2fdcc2b5d049ca8c5f5db233cc5f82aaf
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user