@@ -28,7 +28,7 @@ use crate::ln::msgs::{DecodeError, ErrorAction, Init, LightningError, RoutingMes
2828use crate :: ln:: msgs:: { ChannelAnnouncement , ChannelUpdate , NodeAnnouncement , GossipTimestampFilter } ;
2929use crate :: ln:: msgs:: { QueryChannelRange , ReplyChannelRange , QueryShortChannelIds , ReplyShortChannelIdsEnd } ;
3030use crate :: ln:: msgs;
31- use crate :: routing:: utxo:: { self , UtxoLookup } ;
31+ use crate :: routing:: utxo:: { self , UtxoLookup , UtxoResolver } ;
3232use crate :: util:: ser:: { Readable , ReadableArgs , Writeable , Writer , MaybeReadable } ;
3333use crate :: util:: logger:: { Logger , Level } ;
3434use crate :: util:: scid_utils:: { block_from_scid, scid_from_parts, MAX_SCID_BLOCK } ;
@@ -1438,8 +1438,8 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
14381438
14391439 /// Store or update channel info from a channel announcement.
14401440 ///
1441- /// You probably don't want to call this directly, instead relying on a P2PGossipSync's
1442- /// RoutingMessageHandler implementation to call it indirectly. This may be useful to accept
1441+ /// You probably don't want to call this directly, instead relying on a [` P2PGossipSync`] 's
1442+ /// [` RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
14431443 /// routing messages from a source using a protocol other than the lightning P2P protocol.
14441444 ///
14451445 /// If a [`UtxoLookup`] object is provided via `utxo_lookup`, it will be called to verify
@@ -1458,6 +1458,19 @@ impl<L: Deref> NetworkGraph<L> where L::Target: Logger {
14581458 self . update_channel_from_unsigned_announcement_intern ( & msg. contents , Some ( msg) , utxo_lookup)
14591459 }
14601460
1461+ /// Store or update channel info from a channel announcement.
1462+ ///
1463+ /// You probably don't want to call this directly, instead relying on a [`P2PGossipSync`]'s
1464+ /// [`RoutingMessageHandler`] implementation to call it indirectly. This may be useful to accept
1465+ /// routing messages from a source using a protocol other than the lightning P2P protocol.
1466+ ///
1467+ /// This will skip verification of if the channel is actually on-chain.
1468+ pub fn update_channel_from_announcement_no_lookup (
1469+ & self , msg : & ChannelAnnouncement
1470+ ) -> Result < ( ) , LightningError > {
1471+ self . update_channel_from_announcement :: < & UtxoResolver > ( msg, & None )
1472+ }
1473+
14611474 /// Store or update channel info from a channel announcement without verifying the associated
14621475 /// signatures. Because we aren't given the associated signatures here we cannot relay the
14631476 /// channel announcement to any of our peers.
0 commit comments