Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
keorn committed Jan 5, 2017
1 parent ca35555 commit f4ccdd4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion ethcore/src/engines/authority_round.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ use service::ClientIoMessage;
use transaction::SignedTransaction;
use env_info::EnvInfo;
use builtin::Builtin;
use state::CleanupMode;

/// `AuthorityRound` params.
#[derive(Debug, PartialEq)]
Expand All @@ -62,7 +63,7 @@ impl From<ethjson::spec::AuthorityRoundParams> for AuthorityRoundParams {
step_duration: Duration::from_secs(p.step_duration.into()),
authority_n: p.authorities.len(),
authorities: p.authorities.into_iter().map(Into::into).collect::<Vec<_>>(),
block_reward: p.block_reward.map_or(U256::zero, Into::into),
block_reward: p.block_reward.map_or_else(U256::zero, Into::into),
start_step: p.start_step.map(Into::into),
}
}
Expand Down
1 change: 1 addition & 0 deletions ethcore/src/engines/tendermint/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ use views::HeaderView;
use evm::Schedule;
use io::{IoService, IoChannel};
use service::ClientIoMessage;
use state::CleanupMode;
use self::message::*;
use self::transition::TransitionHandler;
use self::params::TendermintParams;
Expand Down
5 changes: 3 additions & 2 deletions ethcore/src/engines/tendermint/params.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

use ethjson;
use super::transition::TendermintTimeouts;
use util::{Address, U256};
use util::{Address, Uint, U256};
use time::Duration;

/// `Tendermint` params.
Expand All @@ -44,7 +44,7 @@ impl Default for TendermintParams {
gas_limit_bound_divisor: 0x0400.into(),
authorities: authorities,
authority_n: val_n,
block_reward: p.block_reward.map_or(U256::zero, Into::into),
block_reward: U256::zero(),
timeouts: TendermintTimeouts::default(),
}
}
Expand All @@ -70,6 +70,7 @@ impl From<ethjson::spec::TendermintParams> for TendermintParams {
precommit: p.timeout_precommit.map_or(dt.precommit, to_duration),
commit: p.timeout_commit.map_or(dt.commit, to_duration),
},
block_reward: p.block_reward.map_or_else(U256::zero, Into::into),
}
}
}

0 comments on commit f4ccdd4

Please sign in to comment.