1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use crate::channel::ChannelId;
use crate::channel::ChannelSetup;
use crate::node::NodeState;
use crate::policy::validator::EnforcementState;
use crate::prelude::*;

/// A persistence layer entry for a Node
#[allow(missing_docs)]
pub struct NodeEntry {
    pub key_derivation_style: u8,
    pub network: String,
    pub state: NodeState,
}

/// A persistence layer entry for a channel
#[allow(missing_docs)]
#[derive(Debug)]
pub struct ChannelEntry {
    pub channel_value_satoshis: u64,
    pub channel_setup: Option<ChannelSetup>,
    // Permanent channel ID if different from the initial channel ID
    pub id: Option<ChannelId>,
    pub enforcement_state: EnforcementState,
    pub blockheight: Option<u32>,
}