Struct lightning_signer::policy::validator::EnforcementState[][src]

pub struct EnforcementState {
    pub next_holder_commit_num: u64,
    pub next_counterparty_commit_num: u64,
    pub next_counterparty_revoke_num: u64,
    pub current_counterparty_point: Option<PublicKey>,
    pub previous_counterparty_point: Option<PublicKey>,
    pub current_holder_commit_info: Option<CommitmentInfo2>,
    pub current_counterparty_commit_info: Option<CommitmentInfo2>,
    pub previous_counterparty_commit_info: Option<CommitmentInfo2>,
    pub mutual_close_signed: bool,
}
Expand description

Enforcement state for a signer

This keeps track of commitments on both sides and whether the channel was closed.

Fields

next_holder_commit_num: u64next_counterparty_commit_num: u64next_counterparty_revoke_num: u64current_counterparty_point: Option<PublicKey>previous_counterparty_point: Option<PublicKey>current_holder_commit_info: Option<CommitmentInfo2>current_counterparty_commit_info: Option<CommitmentInfo2>previous_counterparty_commit_info: Option<CommitmentInfo2>mutual_close_signed: bool

Implementations

Create state for a new channel

Returns the minimum amount to_holder from both commitments or None if the amounts are not within epsilon_sat.

Returns the minimum amount to_counterparty from both commitments or None if the amounts are not within epsilon_sat.

Set next holder commitment number

Get the current commitment info

Set next counterparty commitment number

Previous counterparty commitment point

Previous counterparty commitment info

Set next counterparty revoked commitment number

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.