@@ -1553,6 +1553,8 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
1553
1553
let node_id_a = channel_info. node_one . clone ( ) ;
1554
1554
let node_id_b = channel_info. node_two . clone ( ) ;
1555
1555
1556
+ log_gossip ! ( self . logger, "Adding channel {} between nodes {} and {}" , short_channel_id, node_id_a, node_id_b) ;
1557
+
1556
1558
match channels. entry ( short_channel_id) {
1557
1559
IndexedMapEntry :: Occupied ( mut entry) => {
1558
1560
//TODO: because asking the blockchain if short_channel_id is valid is only optional
@@ -1788,16 +1790,23 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
1788
1790
let mut scids_to_remove = Vec :: new ( ) ;
1789
1791
for ( scid, info) in channels. unordered_iter_mut ( ) {
1790
1792
if info. one_to_two . is_some ( ) && info. one_to_two . as_ref ( ) . unwrap ( ) . last_update < min_time_unix {
1793
+ log_gossip ! ( self . logger, "Removing directional update one_to_two (0) for channel {} due to its timestamp {} being below {}" ,
1794
+ scid, info. one_to_two. as_ref( ) . unwrap( ) . last_update, min_time_unix) ;
1791
1795
info. one_to_two = None ;
1792
1796
}
1793
1797
if info. two_to_one . is_some ( ) && info. two_to_one . as_ref ( ) . unwrap ( ) . last_update < min_time_unix {
1798
+ log_gossip ! ( self . logger, "Removing directional update two_to_one (1) for channel {} due to its timestamp {} being below {}" ,
1799
+ scid, info. two_to_one. as_ref( ) . unwrap( ) . last_update, min_time_unix) ;
1794
1800
info. two_to_one = None ;
1795
1801
}
1796
1802
if info. one_to_two . is_none ( ) || info. two_to_one . is_none ( ) {
1797
1803
// We check the announcement_received_time here to ensure we don't drop
1798
1804
// announcements that we just received and are just waiting for our peer to send a
1799
1805
// channel_update for.
1800
- if info. announcement_received_time < min_time_unix as u64 {
1806
+ let announcement_received_timestamp = info. announcement_received_time ;
1807
+ if announcement_received_timestamp < min_time_unix as u64 {
1808
+ log_gossip ! ( self . logger, "Removing channel {} because both directional updates are missing and its announcement timestamp {} being below {}" ,
1809
+ scid, announcement_received_timestamp, min_time_unix) ;
1801
1810
scids_to_remove. push ( * scid) ;
1802
1811
}
1803
1812
}
@@ -1878,6 +1887,8 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
1878
1887
}
1879
1888
}
1880
1889
1890
+ log_gossip ! ( self . logger, "Updating channel {} in direction {} with timestamp {}" , msg. short_channel_id, msg. flags & 1 , msg. timestamp) ;
1891
+
1881
1892
let mut channels = self . channels . write ( ) . unwrap ( ) ;
1882
1893
match channels. get_mut ( & msg. short_channel_id ) {
1883
1894
None => {
0 commit comments