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