brk_types 0.3.0-alpha.6

Structs used throughout BRK
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};

use super::{Height, Timestamp};

/// A single difficulty data point in the hashrate summary.
#[derive(Debug, Serialize, Deserialize, JsonSchema)]
pub struct DifficultyEntry {
    /// Unix timestamp of the difficulty adjustment
    pub time: Timestamp,
    /// Block height of the adjustment
    pub height: Height,
    /// Difficulty value
    pub difficulty: f64,
    /// Adjustment ratio (new/previous, e.g. 1.068 = +6.8%)
    pub adjustment: f64,
}