From 6db0bcefa539ee1fb3f285b80e51dbf04cf405f5 Mon Sep 17 00:00:00 2001 From: Ignotus Peverell Date: Wed, 17 Oct 2018 18:16:20 +0000 Subject: [PATCH] Minor warning removal --- core/src/consensus.rs | 5 ++++- core/src/global.rs | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/consensus.rs b/core/src/consensus.rs index b775a7fa1..aecfb1371 100644 --- a/core/src/consensus.rs +++ b/core/src/consensus.rs @@ -47,10 +47,13 @@ pub fn reward(fee: u64) -> u64 { REWARD + fee } -/// Nominal height for standard time intervals +/// Nominal height for standard time intervals, hour is 60 blocks pub const HOUR_HEIGHT: u64 = 3600 / BLOCK_TIME_SEC; +/// A day is 1440 blocks pub const DAY_HEIGHT: u64 = 24 * HOUR_HEIGHT; +/// A week is 10_080 blocks pub const WEEK_HEIGHT: u64 = 7 * DAY_HEIGHT; +/// A year is 524_160 blocks pub const YEAR_HEIGHT: u64 = 52 * WEEK_HEIGHT; /// Number of blocks before a coinbase matures and can be spent diff --git a/core/src/global.rs b/core/src/global.rs index 3c509eb9c..68cae0e80 100644 --- a/core/src/global.rs +++ b/core/src/global.rs @@ -19,7 +19,7 @@ use consensus::HeaderInfo; use consensus::{ graph_weight, BASE_EDGE_BITS, BLOCK_TIME_SEC, COINBASE_MATURITY, CUT_THROUGH_HORIZON, - DAY_HEIGHT, DIFFICULTY_ADJUST_WINDOW, INITIAL_DIFFICULTY, MIN_DIFFICULTY, PROOFSIZE, + DAY_HEIGHT, DIFFICULTY_ADJUST_WINDOW, INITIAL_DIFFICULTY, PROOFSIZE, SECOND_POW_EDGE_BITS, }; use pow::{self, CuckatooContext, EdgeType, PoWContext};