@@ -250,7 +250,7 @@ impl HeaderInfo {
|
||||
|
||||
/// Move value linearly toward a goal
|
||||
pub fn damp(actual: u64, goal: u64, damp_factor: u64) -> u64 {
|
||||
(1 * actual + (damp_factor - 1) * goal) / damp_factor
|
||||
(actual + (damp_factor - 1) * goal) / damp_factor
|
||||
}
|
||||
|
||||
/// limit value to be within some factor from a goal
|
||||
|
||||
@@ -418,6 +418,7 @@ impl Block {
|
||||
/// TODO - Move this somewhere where only tests will use it.
|
||||
/// *** Only used in tests. ***
|
||||
///
|
||||
#[warn(clippy::new_ret_no_self)]
|
||||
pub fn new(
|
||||
prev: &BlockHeader,
|
||||
txs: Vec<Transaction>,
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
// required for genesis replacement
|
||||
//! #![allow(unused_imports)]
|
||||
|
||||
#![cfg_attr(feature = "cargo-clippy", allow(clippy::unreadable_literal))]
|
||||
|
||||
use chrono::prelude::{TimeZone, Utc};
|
||||
|
||||
use crate::core;
|
||||
|
||||
Reference in New Issue
Block a user