[][src]Trait lightning::ln::msgs::ChannelMessageHandler

pub trait ChannelMessageHandler: MessageSendEventsProvider + Send + Sync {
    pub fn handle_open_channel(
        &self,
        their_node_id: &PublicKey,
        their_features: InitFeatures,
        msg: &OpenChannel
    );
pub fn handle_accept_channel(
        &self,
        their_node_id: &PublicKey,
        their_features: InitFeatures,
        msg: &AcceptChannel
    );
pub fn handle_funding_created(
        &self,
        their_node_id: &PublicKey,
        msg: &FundingCreated
    );
pub fn handle_funding_signed(
        &self,
        their_node_id: &PublicKey,
        msg: &FundingSigned
    );
pub fn handle_funding_locked(
        &self,
        their_node_id: &PublicKey,
        msg: &FundingLocked
    );
pub fn handle_shutdown(&self, their_node_id: &PublicKey, msg: &Shutdown);
pub fn handle_closing_signed(
        &self,
        their_node_id: &PublicKey,
        msg: &ClosingSigned
    );
pub fn handle_update_add_htlc(
        &self,
        their_node_id: &PublicKey,
        msg: &UpdateAddHTLC
    );
pub fn handle_update_fulfill_htlc(
        &self,
        their_node_id: &PublicKey,
        msg: &UpdateFulfillHTLC
    );
pub fn handle_update_fail_htlc(
        &self,
        their_node_id: &PublicKey,
        msg: &UpdateFailHTLC
    );
pub fn handle_update_fail_malformed_htlc(
        &self,
        their_node_id: &PublicKey,
        msg: &UpdateFailMalformedHTLC
    );
pub fn handle_commitment_signed(
        &self,
        their_node_id: &PublicKey,
        msg: &CommitmentSigned
    );
pub fn handle_revoke_and_ack(
        &self,
        their_node_id: &PublicKey,
        msg: &RevokeAndACK
    );
pub fn handle_update_fee(&self, their_node_id: &PublicKey, msg: &UpdateFee);
pub fn handle_announcement_signatures(
        &self,
        their_node_id: &PublicKey,
        msg: &AnnouncementSignatures
    );
pub fn peer_disconnected(
        &self,
        their_node_id: &PublicKey,
        no_connection_possible: bool
    );
pub fn peer_connected(&self, their_node_id: &PublicKey, msg: &Init);
pub fn handle_channel_reestablish(
        &self,
        their_node_id: &PublicKey,
        msg: &ChannelReestablish
    );
pub fn handle_error(&self, their_node_id: &PublicKey, msg: &ErrorMessage); }

A trait to describe an object which can receive channel messages.

Messages MAY be called in parallel when they originate from different their_node_ids, however they MUST NOT be called in parallel when the two calls have the same their_node_id.

Required methods

pub fn handle_open_channel(
    &self,
    their_node_id: &PublicKey,
    their_features: InitFeatures,
    msg: &OpenChannel
)
[src]

Handle an incoming open_channel message from the given peer.

pub fn handle_accept_channel(
    &self,
    their_node_id: &PublicKey,
    their_features: InitFeatures,
    msg: &AcceptChannel
)
[src]

Handle an incoming accept_channel message from the given peer.

pub fn handle_funding_created(
    &self,
    their_node_id: &PublicKey,
    msg: &FundingCreated
)
[src]

Handle an incoming funding_created message from the given peer.

pub fn handle_funding_signed(
    &self,
    their_node_id: &PublicKey,
    msg: &FundingSigned
)
[src]

Handle an incoming funding_signed message from the given peer.

pub fn handle_funding_locked(
    &self,
    their_node_id: &PublicKey,
    msg: &FundingLocked
)
[src]

Handle an incoming funding_locked message from the given peer.

pub fn handle_shutdown(&self, their_node_id: &PublicKey, msg: &Shutdown)[src]

Handle an incoming shutdown message from the given peer.

pub fn handle_closing_signed(
    &self,
    their_node_id: &PublicKey,
    msg: &ClosingSigned
)
[src]

Handle an incoming closing_signed message from the given peer.

pub fn handle_update_add_htlc(
    &self,
    their_node_id: &PublicKey,
    msg: &UpdateAddHTLC
)
[src]

Handle an incoming update_add_htlc message from the given peer.

pub fn handle_update_fulfill_htlc(
    &self,
    their_node_id: &PublicKey,
    msg: &UpdateFulfillHTLC
)
[src]

Handle an incoming update_fulfill_htlc message from the given peer.

pub fn handle_update_fail_htlc(
    &self,
    their_node_id: &PublicKey,
    msg: &UpdateFailHTLC
)
[src]

Handle an incoming update_fail_htlc message from the given peer.

pub fn handle_update_fail_malformed_htlc(
    &self,
    their_node_id: &PublicKey,
    msg: &UpdateFailMalformedHTLC
)
[src]

Handle an incoming update_fail_malformed_htlc message from the given peer.

pub fn handle_commitment_signed(
    &self,
    their_node_id: &PublicKey,
    msg: &CommitmentSigned
)
[src]

Handle an incoming commitment_signed message from the given peer.

pub fn handle_revoke_and_ack(
    &self,
    their_node_id: &PublicKey,
    msg: &RevokeAndACK
)
[src]

Handle an incoming revoke_and_ack message from the given peer.

pub fn handle_update_fee(&self, their_node_id: &PublicKey, msg: &UpdateFee)[src]

Handle an incoming update_fee message from the given peer.

pub fn handle_announcement_signatures(
    &self,
    their_node_id: &PublicKey,
    msg: &AnnouncementSignatures
)
[src]

Handle an incoming announcement_signatures message from the given peer.

pub fn peer_disconnected(
    &self,
    their_node_id: &PublicKey,
    no_connection_possible: bool
)
[src]

Indicates a connection to the peer failed/an existing connection was lost. If no connection is believed to be possible in the future (eg they're sending us messages we don't understand or indicate they require unknown feature bits), no_connection_possible is set and any outstanding channels should be failed.

pub fn peer_connected(&self, their_node_id: &PublicKey, msg: &Init)[src]

Handle a peer reconnecting, possibly generating channel_reestablish message(s).

pub fn handle_channel_reestablish(
    &self,
    their_node_id: &PublicKey,
    msg: &ChannelReestablish
)
[src]

Handle an incoming channel_reestablish message from the given peer.

pub fn handle_error(&self, their_node_id: &PublicKey, msg: &ErrorMessage)[src]

Handle an incoming error message from the given peer.

Loading content...

Implementors

impl<ChanSigner: ChannelKeys, M: Deref + Sync + Send, T: Deref + Sync + Send, K: Deref + Sync + Send, F: Deref + Sync + Send, L: Deref + Sync + Send> ChannelMessageHandler for ChannelManager<ChanSigner, M, T, K, F, L> where
    M::Target: Watch<Keys = ChanSigner>,
    T::Target: BroadcasterInterface,
    K::Target: KeysInterface<ChanKeySigner = ChanSigner>,
    F::Target: FeeEstimator,
    L::Target: Logger
[src]

Loading content...