Skip to content

Commit

Permalink
fix lints
Browse files Browse the repository at this point in the history
  • Loading branch information
CjS77 committed Feb 21, 2024
1 parent 1e8ca53 commit ec1245e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ impl From<ConsensusConstants> for grpc::ConsensusConstants {

let proof_of_work = HashMap::from_iter([(0u32, randomx_pow), (1u32, sha3x_pow)]);

#[allow(deprecated)]
Self {
coinbase_min_maturity: cc.coinbase_min_maturity(),
blockchain_version: cc.blockchain_version().into(),
Expand Down
6 changes: 5 additions & 1 deletion base_layer/core/src/consensus/consensus_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,8 @@ impl ConsensusConstantsBuilder {

#[cfg(test)]
mod test {
use std::convert::TryFrom;

use crate::{
consensus::{
emission::{Emission, EmissionSchedule},
Expand Down Expand Up @@ -977,7 +979,9 @@ mod test {
7_935_818_494_624_306 * uT + esmeralda[0].faucet_value()
);
// 21 billion
let mut rewards = schedule.iter().skip(3255552 + coinbase_offset as usize);
let mut rewards = schedule
.iter()
.skip(3255552 + usize::try_from(coinbase_offset).unwrap());
let (block_num, reward, supply) = rewards.next().unwrap();
assert_eq!(block_num, 3255553 + coinbase_offset);
assert_eq!(reward, 800_000_415 * uT);
Expand Down

0 comments on commit ec1245e

Please sign in to comment.