Enum lightning::routing::network_graph::NetworkUpdate
source · [−]pub enum NetworkUpdate {
ChannelUpdateMessage {
msg: ChannelUpdate,
},
ChannelClosed {
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
.
ChannelClosed
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 only that a channel has been closed, which should be applied via
NetworkGraph::close_channel_from_update
.
NodeFailure
Fields
node_id: PublicKey
The node id of the failed node.
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 only that a node has failed, which should be applied via
NetworkGraph::fail_node
.
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 encode_with_len(&self) -> Vec<u8>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_with_len(&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 · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more