Skip to content

Commit

Permalink
Move network constants into runtime::builtin::network
Browse files Browse the repository at this point in the history
  • Loading branch information
Stebalien committed Feb 8, 2024
1 parent f2cfcde commit 07815ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions runtime/src/builtin/network.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// Copyright 2019-2022 ChainSafe Systems
// SPDX-License-Identifier: Apache-2.0, MIT

use fvm_shared::clock::EPOCH_DURATION_SECONDS;
pub use fvm_shared::BLOCKS_PER_EPOCH as EXPECTED_LEADERS_PER_EPOCH;

pub const EPOCH_DURATION_SECONDS: i64 = 30;
pub const SECONDS_IN_HOUR: i64 = 3600;
pub const SECONDS_IN_DAY: i64 = 86400;
pub const SECONDS_IN_YEAR: i64 = 31556925;
pub const EPOCHS_IN_HOUR: i64 = SECONDS_IN_HOUR / EPOCH_DURATION_SECONDS;
pub const EPOCHS_IN_DAY: i64 = SECONDS_IN_DAY / EPOCH_DURATION_SECONDS;
pub const EPOCHS_IN_YEAR: i64 = SECONDS_IN_YEAR / EPOCH_DURATION_SECONDS;

pub const EXPECTED_LEADERS_PER_EPOCH: u64 = 5;
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use fvm_ipld_blockstore::Blockstore;
use fvm_ipld_hamt::Sha256;
use fvm_ipld_hamt::{BytesKey, Error as HamtError, Hamt};
use fvm_shared::bigint::BigInt;
pub use fvm_shared::BLOCKS_PER_EPOCH as EXPECTED_LEADERS_PER_EPOCH;
use serde::de::DeserializeOwned;
use serde::Serialize;
use unsigned_varint::decode::Error as UVarintError;
Expand Down
1 change: 0 additions & 1 deletion runtime/src/runtime/policy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ impl Default for Policy {

pub mod policy_constants {
use fvm_shared::clock::ChainEpoch;
use fvm_shared::clock::EPOCH_DURATION_SECONDS;
use fvm_shared::sector::SectorNumber;

use crate::builtin::*;
Expand Down

0 comments on commit 07815ae

Please sign in to comment.