mirror of
https://github.com/hinto-janai/cuprate.git
synced 2024-12-23 03:59:37 +00:00
revert
This commit is contained in:
parent
8c94b7131f
commit
0d9891de19
7 changed files with 8 additions and 29 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -915,7 +915,6 @@ name = "cuprate-types"
|
||||||
version = "0.0.0"
|
version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cuprate-constants",
|
|
||||||
"cuprate-epee-encoding",
|
"cuprate-epee-encoding",
|
||||||
"cuprate-fixed-bytes",
|
"cuprate-fixed-bytes",
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
|
|
|
@ -13,7 +13,6 @@ default = []
|
||||||
block = []
|
block = []
|
||||||
build = []
|
build = []
|
||||||
rpc = []
|
rpc = []
|
||||||
output = []
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|
||||||
|
|
|
@ -11,15 +11,3 @@ pub const MAX_BLOCK_HEIGHT: u64 = 500_000_000;
|
||||||
/// [`MAX_BLOCK_HEIGHT`] as a [`usize`].
|
/// [`MAX_BLOCK_HEIGHT`] as a [`usize`].
|
||||||
#[expect(clippy::cast_possible_truncation, reason = "will not be truncated")]
|
#[expect(clippy::cast_possible_truncation, reason = "will not be truncated")]
|
||||||
pub const MAX_BLOCK_HEIGHT_USIZE: usize = MAX_BLOCK_HEIGHT as usize;
|
pub const MAX_BLOCK_HEIGHT_USIZE: usize = MAX_BLOCK_HEIGHT as usize;
|
||||||
|
|
||||||
/// Target block time for hardfork 1.
|
|
||||||
#[doc = monero_definition_link!(a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623, "/src/cryptonote_config.h", 81)]
|
|
||||||
///
|
|
||||||
/// ref: <https://monero-book.cuprate.org/consensus_rules/blocks/difficulty.html#target-seconds>
|
|
||||||
pub const BLOCK_TIME_V1: Duration = Duration::from_secs(60);
|
|
||||||
|
|
||||||
/// Target block time from hardfork v2.
|
|
||||||
#[doc = monero_definition_link!(a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623, "/src/cryptonote_config.h", 80)]
|
|
||||||
///
|
|
||||||
/// ref: <https://monero-book.cuprate.org/consensus_rules/blocks/difficulty.html#target-seconds>
|
|
||||||
pub const BLOCK_TIME_V2: Duration = Duration::from_secs(120);
|
|
||||||
|
|
|
@ -8,7 +8,5 @@ mod macros;
|
||||||
pub mod block;
|
pub mod block;
|
||||||
#[cfg(feature = "build")]
|
#[cfg(feature = "build")]
|
||||||
pub mod build;
|
pub mod build;
|
||||||
#[cfg(feature = "output")]
|
|
||||||
pub mod output;
|
|
||||||
#[cfg(feature = "rpc")]
|
#[cfg(feature = "rpc")]
|
||||||
pub mod rpc;
|
pub mod rpc;
|
||||||
|
|
|
@ -1,11 +0,0 @@
|
||||||
//! Output related.
|
|
||||||
|
|
||||||
use crate::macros::monero_definition_link;
|
|
||||||
|
|
||||||
/// The minimum amount of blocks a coinbase output is locked for.
|
|
||||||
#[doc = monero_definition_link!(a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623, "/src/cryptonote_config.h", 40)]
|
|
||||||
pub const COINBASE_LOCK_WINDOW: usize = 60;
|
|
||||||
|
|
||||||
/// The minimum amount of blocks an output is locked for.
|
|
||||||
#[doc = monero_definition_link!(a1dc85c5373a30f14aaf7dcfdd95f5a7375d3623, "/src/cryptonote_config.h", 49)]
|
|
||||||
pub const DEFAULT_LOCK_WINDOW: usize = 10;
|
|
|
@ -16,7 +16,6 @@ serde = ["dep:serde"]
|
||||||
proptest = ["dep:proptest", "dep:proptest-derive"]
|
proptest = ["dep:proptest", "dep:proptest-derive"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
cuprate-constants = { path = "../constants", features = ["block"] }
|
|
||||||
cuprate-epee-encoding = { path = "../net/epee-encoding", optional = true }
|
cuprate-epee-encoding = { path = "../net/epee-encoding", optional = true }
|
||||||
cuprate-fixed-bytes = { path = "../net/fixed-bytes" }
|
cuprate-fixed-bytes = { path = "../net/fixed-bytes" }
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,14 @@ use std::time::Duration;
|
||||||
|
|
||||||
use monero_serai::block::BlockHeader;
|
use monero_serai::block::BlockHeader;
|
||||||
|
|
||||||
use cuprate_constants::block::{BLOCK_TIME_V1, BLOCK_TIME_V2};
|
/// Target block time for hf 1.
|
||||||
|
///
|
||||||
|
/// ref: <https://monero-book.cuprate.org/consensus_rules/blocks/difficulty.html#target-seconds>
|
||||||
|
const BLOCK_TIME_V1: Duration = Duration::from_secs(60);
|
||||||
|
/// Target block time from v2.
|
||||||
|
///
|
||||||
|
/// ref: <https://monero-book.cuprate.org/consensus_rules/blocks/difficulty.html#target-seconds>
|
||||||
|
const BLOCK_TIME_V2: Duration = Duration::from_secs(120);
|
||||||
|
|
||||||
/// An error working with a [`HardFork`].
|
/// An error working with a [`HardFork`].
|
||||||
#[derive(Debug, Copy, Clone, PartialEq, Eq, thiserror::Error)]
|
#[derive(Debug, Copy, Clone, PartialEq, Eq, thiserror::Error)]
|
||||||
|
|
Loading…
Reference in a new issue