diff --git a/src/builder.rs b/src/builder.rs index d45c85339..2f4bb3d1a 100644 --- a/src/builder.rs +++ b/src/builder.rs @@ -8,8 +8,8 @@ use crate::logger::{log_error, FilesystemLogger, Logger}; use crate::payment_store::PaymentStore; use crate::peer_store::PeerStore; use crate::types::{ - ChainMonitor, ChannelManager, GossipSync, KeysManager, NetAddress, NetworkGraph, - OnionMessenger, PeerManager, + ChainMonitor, ChannelManager, FakeMessageRouter, GossipSync, KeysManager, NetAddress, + NetworkGraph, OnionMessenger, PeerManager, }; use crate::wallet::Wallet; use crate::LogLevel; @@ -18,7 +18,6 @@ use crate::{ WALLET_KEYS_SEED_LEN, }; -use lightning::sign::EntropySource; use lightning::chain::{chainmonitor, BestBlock, Watch}; use lightning::ln::channelmanager::{self, ChainParameters, ChannelManagerReadArgs}; use lightning::ln::msgs::RoutingMessageHandler; @@ -27,6 +26,7 @@ use lightning::routing::router::DefaultRouter; use lightning::routing::scoring::{ ProbabilisticScorer, ProbabilisticScoringDecayParameters, ProbabilisticScoringFeeParameters, }; +use lightning::sign::EntropySource; use lightning::util::config::UserConfig; use lightning::util::ser::ReadableArgs; @@ -604,6 +604,8 @@ fn build_with_store_internal( Arc::clone(&keys_manager), Arc::clone(&keys_manager), Arc::clone(&logger), + Arc::new(FakeMessageRouter {}), + IgnoringMessageHandler {}, IgnoringMessageHandler {}, )); let ephemeral_bytes: [u8; 32] = keys_manager.get_secure_random_bytes(); diff --git a/src/types.rs b/src/types.rs index c9f184c4f..298c9421e 100644 --- a/src/types.rs +++ b/src/types.rs @@ -89,9 +89,22 @@ pub(crate) type OnionMessenger = lightning::onion_message::OnionMessenger< Arc>>, Arc>>, Arc, + Arc, + IgnoringMessageHandler, IgnoringMessageHandler, >; +pub(crate) struct FakeMessageRouter {} + +impl lightning::onion_message::MessageRouter for FakeMessageRouter { + fn find_path( + &self, _sender: PublicKey, _peers: Vec, + _destination: lightning::onion_message::Destination, + ) -> Result { + unimplemented!() + } +} + /// The global identifier of a channel. /// /// Note that this will start out to be a temporary ID until channel funding negotiation is