use chain::chaininterface::{ChainError, ChainWatchInterface};
use ln::channelmanager;
-use ln::msgs::{DecodeError,ErrorAction,LightningError,RoutingMessageHandler,NetAddress,ChannelFeatures,NodeFeatures};
+use ln::features::{ChannelFeatures, NodeFeatures};
+use ln::msgs::{DecodeError,ErrorAction,LightningError,RoutingMessageHandler,NetAddress};
use ln::msgs;
use util::ser::{Writeable, Readable, Writer, ReadableArgs};
use util::logger::Logger;
channels: vec!(NetworkMap::get_key(msg.contents.short_channel_id, msg.contents.chain_hash)),
lowest_inbound_channel_fee_base_msat: u32::max_value(),
lowest_inbound_channel_fee_proportional_millionths: u32::max_value(),
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 0,
rgb: [0; 3],
alias: [0; 32],
channels: Vec::new(),
lowest_inbound_channel_fee_base_msat: u32::max_value(),
lowest_inbound_channel_fee_proportional_millionths: u32::max_value(),
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 0,
rgb: [0; 3],
alias: [0; 32],
use chain::chaininterface;
use ln::channelmanager;
use ln::router::{Router,NodeInfo,NetworkMap,ChannelInfo,DirectionalChannelInfo,RouteHint};
- use ln::msgs::{ChannelFeatures, NodeFeatures, LightningError, ErrorAction};
+ use ln::features::{ChannelFeatures, NodeFeatures};
+ use ln::msgs::{LightningError, ErrorAction};
use util::test_utils;
use util::test_utils::TestVecWriter;
use util::logger::Logger;
channels: vec!(NetworkMap::get_key(1, zero_hash.clone()), NetworkMap::get_key(3, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 100,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(1, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: our_id.clone(),
last_update: 0,
channels: vec!(NetworkMap::get_key(2, zero_hash.clone()), NetworkMap::get_key(4, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(2, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: our_id.clone(),
last_update: 0,
channels: vec!(NetworkMap::get_key(12, zero_hash.clone()), NetworkMap::get_key(13, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(12, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: our_id.clone(),
last_update: 0,
NetworkMap::get_key(7, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(3, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node1.clone(),
last_update: 0,
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(4, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node2.clone(),
last_update: 0,
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(13, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node8.clone(),
last_update: 0,
channels: vec!(NetworkMap::get_key(5, zero_hash.clone()), NetworkMap::get_key(11, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(5, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node3.clone(),
last_update: 0,
channels: vec!(NetworkMap::get_key(6, zero_hash.clone()), NetworkMap::get_key(11, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(6, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node3.clone(),
last_update: 0,
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(11, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node5.clone(),
last_update: 0,
channels: vec!(NetworkMap::get_key(7, zero_hash.clone())),
lowest_inbound_channel_fee_base_msat: 0,
lowest_inbound_channel_fee_proportional_millionths: 0,
- features: NodeFeatures::new(),
+ features: NodeFeatures::empty(),
last_update: 1,
rgb: [0; 3],
alias: [0; 32],
announcement_message: None,
});
network.channels.insert(NetworkMap::get_key(7, zero_hash.clone()), ChannelInfo {
- features: ChannelFeatures::new(),
+ features: ChannelFeatures::empty(),
one_to_two: DirectionalChannelInfo {
src_node_id: node3.clone(),
last_update: 0,