pub enum NetworkUpdate {
ChannelUpdateMessage {
msg: ChannelUpdate,
},
ChannelFailure {
short_channel_id: u64,
is_permanent: bool,
},
NodeFailure {
node_id: PublicKey,
is_permanent: bool,
},
}
Expand description
Update to the NetworkGraph
based on payment failure information conveyed via the Onion
return packet by a node along the route. See BOLT #4 for details.
Variants
ChannelUpdateMessage
Fields
msg: ChannelUpdate
The update to apply via NetworkGraph::update_channel
.
An error indicating a channel_update
messages should be applied via
NetworkGraph::update_channel
.
ChannelFailure
Fields
short_channel_id: u64
The short channel id of the closed channel.
is_permanent: bool
Whether the channel should be permanently removed or temporarily disabled until a new
channel_update
message is received.
An error indicating that a channel failed to route a payment, which should be applied via
NetworkGraph::channel_failed
.
NodeFailure
Fields
is_permanent: bool
Whether the node should be permanently removed from consideration or can be restored
when a new channel_update
message is received.
An error indicating that a node failed to route a payment, which should be applied via
NetworkGraph::node_failed
.
Trait Implementations
sourceimpl Clone for NetworkUpdate
impl Clone for NetworkUpdate
sourcefn clone(&self) -> NetworkUpdate
fn clone(&self) -> NetworkUpdate
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for NetworkUpdate
impl Debug for NetworkUpdate
sourceimpl MaybeReadable for NetworkUpdate
impl MaybeReadable for NetworkUpdate
sourceimpl PartialEq<NetworkUpdate> for NetworkUpdate
impl PartialEq<NetworkUpdate> for NetworkUpdate
sourcefn eq(&self, other: &NetworkUpdate) -> bool
fn eq(&self, other: &NetworkUpdate) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &NetworkUpdate) -> bool
fn ne(&self, other: &NetworkUpdate) -> bool
This method tests for !=
.
sourceimpl Writeable for NetworkUpdate
impl Writeable for NetworkUpdate
sourcefn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
fn write<W: Writer>(&self, writer: &mut W) -> Result<(), Error>
Writes self out to the given Writer
sourcefn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Writes self out to a Vec
sourcefn serialized_length(&self) -> usize
fn serialized_length(&self) -> usize
Gets the length of this object after it has been serialized. This can be overridden to optimize cases where we prepend an object with its length. Read more
impl StructuralPartialEq for NetworkUpdate
Auto Trait Implementations
impl RefUnwindSafe for NetworkUpdate
impl Send for NetworkUpdate
impl Sync for NetworkUpdate
impl Unpin for NetworkUpdate
impl UnwindSafe for NetworkUpdate
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more