You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -102,11 +102,11 @@ impl<C: Deref + Sync + Send, L: Deref + Sync + Send> RoutingMessageHandler for N
102
102
}
103
103
//TODO: Check if value is worth storing, use it to inform routing, and compare it
104
104
//to the new HTLC max field in channel_update
105
-
true
105
+
Some(value)
106
106
},
107
107
Err(ChainError::NotSupported) => {
108
108
// Tentatively accept, potentially exposing us to DoS attacks
109
-
false
109
+
None
110
110
},
111
111
Err(ChainError::NotWatched) => {
112
112
returnErr(LightningError{err:format!("Channel announced on an unknown chain ({})", msg.contents.chain_hash.encode().to_hex()),action:ErrorAction::IgnoreError});
@@ -115,7 +115,7 @@ impl<C: Deref + Sync + Send, L: Deref + Sync + Send> RoutingMessageHandler for N
115
115
returnErr(LightningError{err:"Channel announced without corresponding UTXO entry".to_owned(),action:ErrorAction::IgnoreError});
116
116
},
117
117
};
118
-
let result = self.network_graph.write().unwrap().update_channel_from_announcement(msg,checked_utxo,Some(&self.secp_ctx));
118
+
let result = self.network_graph.write().unwrap().update_channel_from_announcement(msg,utxo_value,Some(&self.secp_ctx));
119
119
log_trace!(self.logger,"Added channel_announcement for {}{}", msg.contents.short_channel_id,if !msg.contents.excess_data.is_empty(){" with excess uninterpreted data!"} else {""});
120
120
result
121
121
}
@@ -257,6 +257,8 @@ pub struct ChannelInfo {
257
257
pubnode_two:PublicKey,
258
258
/// Details about the second direction of a channel
259
259
pubtwo_to_one:Option<DirectionalChannelInfo>,
260
+
/// The channel capacity as seen on-chain, if chain lookup is available.
261
+
pubcapacity_sats:Option<u64>,
260
262
/// An initial announcement of the channel
261
263
/// Mostly redundant with the data we store in fields explicitly.
262
264
/// Everything else is useful only for sending out for initial routing sync.
0 commit comments