brk_types 0.3.0-beta.8

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::{CpfpClusterChunk, CpfpClusterTx};

/// CPFP cluster: the connected component the seed belongs to, plus its
/// SFL linearization.
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(rename_all = "camelCase")]
pub struct CpfpCluster {
    /// All txs in the cluster, in topological order (parents before children).
    pub txs: Vec<CpfpClusterTx>,
    /// SFL-emitted chunks ordered by descending feerate.
    pub chunks: Vec<CpfpClusterChunk>,
    /// Index into `chunks` of the chunk containing the seed tx.
    pub chunk_index: u32,
}