pub struct ErroringMessageHandler { /* private fields */ }
Expand description

A dummy struct which implements ChannelMessageHandler without having any channels. You can provide one of these as the route_handler in a MessageHandler.

Implementations§

§

impl ErroringMessageHandler

pub fn new() -> ErroringMessageHandler

Constructs a new ErroringMessageHandler

Trait Implementations§

§

impl ChannelMessageHandler for ErroringMessageHandler

§

fn handle_open_channel(&self, their_node_id: &PublicKey, msg: &OpenChannel)

Handle an incoming open_channel message from the given peer.
§

fn handle_accept_channel(&self, their_node_id: &PublicKey, msg: &AcceptChannel)

Handle an incoming accept_channel message from the given peer.
§

fn handle_funding_created( &self, their_node_id: &PublicKey, msg: &FundingCreated, )

Handle an incoming funding_created message from the given peer.
§

fn handle_funding_signed(&self, their_node_id: &PublicKey, msg: &FundingSigned)

Handle an incoming funding_signed message from the given peer.
§

fn handle_channel_ready(&self, their_node_id: &PublicKey, msg: &ChannelReady)

Handle an incoming channel_ready message from the given peer.
§

fn handle_shutdown(&self, their_node_id: &PublicKey, msg: &Shutdown)

Handle an incoming shutdown message from the given peer.
§

fn handle_closing_signed(&self, their_node_id: &PublicKey, msg: &ClosingSigned)

Handle an incoming closing_signed message from the given peer.
§

fn handle_update_add_htlc(&self, their_node_id: &PublicKey, msg: &UpdateAddHTLC)

Handle an incoming update_add_htlc message from the given peer.
§

fn handle_update_fulfill_htlc( &self, their_node_id: &PublicKey, msg: &UpdateFulfillHTLC, )

Handle an incoming update_fulfill_htlc message from the given peer.
§

fn handle_update_fail_htlc( &self, their_node_id: &PublicKey, msg: &UpdateFailHTLC, )

Handle an incoming update_fail_htlc message from the given peer.
§

fn handle_update_fail_malformed_htlc( &self, their_node_id: &PublicKey, msg: &UpdateFailMalformedHTLC, )

Handle an incoming update_fail_malformed_htlc message from the given peer.
§

fn handle_commitment_signed( &self, their_node_id: &PublicKey, msg: &CommitmentSigned, )

Handle an incoming commitment_signed message from the given peer.
§

fn handle_revoke_and_ack(&self, their_node_id: &PublicKey, msg: &RevokeAndACK)

Handle an incoming revoke_and_ack message from the given peer.
§

fn handle_update_fee(&self, their_node_id: &PublicKey, msg: &UpdateFee)

Handle an incoming update_fee message from the given peer.
§

fn handle_announcement_signatures( &self, their_node_id: &PublicKey, msg: &AnnouncementSignatures, )

Handle an incoming announcement_signatures message from the given peer.
§

fn handle_channel_reestablish( &self, their_node_id: &PublicKey, msg: &ChannelReestablish, )

Handle an incoming channel_reestablish message from the given peer.
§

fn handle_channel_update( &self, _their_node_id: &PublicKey, _msg: &ChannelUpdate, )

Handle an incoming channel_update message from the given peer.
§

fn peer_disconnected(&self, _their_node_id: &PublicKey)

Indicates a connection to the peer failed/an existing connection was lost.
§

fn peer_connected( &self, _their_node_id: &PublicKey, _init: &Init, _inbound: bool, ) -> Result<(), ()>

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

fn handle_error(&self, _their_node_id: &PublicKey, _msg: &ErrorMessage)

Handle an incoming error message from the given peer.
§

fn provided_node_features(&self) -> Features<NodeContext>

Gets the node feature flags which this handler itself supports. All available handlers are queried similarly and their feature flags are OR’d together to form the NodeFeatures which are broadcasted in our NodeAnnouncement message.
§

fn provided_init_features( &self, _their_node_id: &PublicKey, ) -> Features<InitContext>

Gets the init feature flags which should be sent to the given peer. All available handlers are queried similarly and their feature flags are OR’d together to form the InitFeatures which are sent in our Init message. Read more
§

fn get_chain_hashes(&self) -> Option<Vec<ChainHash>>

Gets the chain hashes for this ChannelMessageHandler indicating which chains it supports. Read more
§

fn handle_open_channel_v2(&self, their_node_id: &PublicKey, msg: &OpenChannelV2)

Handle an incoming open_channel2 message from the given peer.
§

fn handle_accept_channel_v2( &self, their_node_id: &PublicKey, msg: &AcceptChannelV2, )

Handle an incoming accept_channel2 message from the given peer.
§

fn handle_tx_add_input(&self, their_node_id: &PublicKey, msg: &TxAddInput)

Handle an incoming tx_add_input message from the given peer.
§

fn handle_tx_add_output(&self, their_node_id: &PublicKey, msg: &TxAddOutput)

Handle an incoming tx_add_output message from the given peer.
§

fn handle_tx_remove_input(&self, their_node_id: &PublicKey, msg: &TxRemoveInput)

Handle an incoming tx_remove_input message from the given peer.
§

fn handle_tx_remove_output( &self, their_node_id: &PublicKey, msg: &TxRemoveOutput, )

Handle an incoming tx_remove_output message from the given peer.
§

fn handle_tx_complete(&self, their_node_id: &PublicKey, msg: &TxComplete)

Handle an incoming tx_complete message from the given peer.
§

fn handle_tx_signatures(&self, their_node_id: &PublicKey, msg: &TxSignatures)

Handle an incoming tx_signatures message from the given peer.
§

fn handle_tx_init_rbf(&self, their_node_id: &PublicKey, msg: &TxInitRbf)

Handle an incoming tx_init_rbf message from the given peer.
§

fn handle_tx_ack_rbf(&self, their_node_id: &PublicKey, msg: &TxAckRbf)

Handle an incoming tx_ack_rbf message from the given peer.
§

fn handle_tx_abort(&self, their_node_id: &PublicKey, msg: &TxAbort)

Handle an incoming tx_abort message from the given peer.
§

impl Deref for ErroringMessageHandler

§

type Target = ErroringMessageHandler

The resulting type after dereferencing.
§

fn deref(&self) -> &ErroringMessageHandler

Dereferences the value.
§

impl MessageSendEventsProvider for ErroringMessageHandler

§

fn get_and_clear_pending_msg_events(&self) -> Vec<MessageSendEvent>

Gets the list of pending events which were generated by previous actions, clearing the list in the process.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<'a, T, E> AsTaggedExplicit<'a, E> for T
where T: 'a,

§

fn explicit(self, class: Class, tag: u32) -> TaggedParser<'a, Explicit, Self, E>

§

impl<'a, T, E> AsTaggedImplicit<'a, E> for T
where T: 'a,

§

fn implicit( self, class: Class, constructed: bool, tag: u32, ) -> TaggedParser<'a, Implicit, Self, E>

source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
§

impl<S, T> ScoreLookUp for T
where S: ScoreLookUp, T: Deref<Target = S>,

§

type ScoreParams = <S as ScoreLookUp>::ScoreParams

A configurable type which should contain various passed-in parameters for configuring the scorer, on a per-routefinding-call basis through to the scorer methods, which are used to determine the parameters for the suitability of channels for use.
§

fn channel_penalty_msat( &self, short_channel_id: u64, source: &NodeId, target: &NodeId, usage: ChannelUsage, score_params: &<T as ScoreLookUp>::ScoreParams, ) -> u64

Returns the fee in msats willing to be paid to avoid routing send_amt_msat through the given channel in the direction from source to target. Read more
§

impl<S, T> ScoreLookUp for T
where S: ScoreLookUp, T: Deref<Target = S>,

§

type ScoreParams = <S as ScoreLookUp>::ScoreParams

A configurable type which should contain various passed-in parameters for configuring the scorer, on a per-routefinding-call basis through to the scorer methods, which are used to determine the parameters for the suitability of channels for use.
§

fn channel_penalty_msat( &self, candidate: &CandidateRouteHop<'_>, usage: ChannelUsage, score_params: &<T as ScoreLookUp>::ScoreParams, ) -> u64

Returns the fee in msats willing to be paid to avoid routing send_amt_msat through the given channel in the direction from source to target. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

impl<T> DartSafe for T

§

impl<T> Formattable for T
where T: Deref, <T as Deref>::Target: Formattable,

§

impl<T> Parsable for T
where T: Deref, <T as Deref>::Target: Parsable,

§

impl<T> TaskRetFutTrait for T
where T: Send,