From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Wed, 31 May 2023 22:48:34 +0000 (+0000) Subject: Merge pull request #2167 from TheBlueMatt/2023-04-monitor-e-monitor-prep X-Git-Tag: v0.0.116-alpha1~25 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=32eb89474cdc1e400ef89eab76d590d19da4746a;p=rust-lightning Merge pull request #2167 from TheBlueMatt/2023-04-monitor-e-monitor-prep Add infra to block ChannelMonitorUpdates on forwarded claims --- 32eb89474cdc1e400ef89eab76d590d19da4746a diff --cc lightning/src/ln/channelmanager.rs index f48900302,0ec8bddf6..0aa2a8552 --- a/lightning/src/ln/channelmanager.rs +++ b/lightning/src/ln/channelmanager.rs @@@ -643,27 -711,27 +713,27 @@@ pub type SimpleArcChannelManager = ChannelManager<&'a M, &'b T, &'c KeysManager, &'c KeysManager, &'c KeysManager, &'d F, &'e DefaultRouter<&'f NetworkGraph<&'g L>, &'g L, &'h Mutex, &'g L>>>, &'g L>; +pub type SimpleRefChannelManager<'a, 'b, 'c, 'd, 'e, 'f, 'g, 'h, M, T, F, L> = ChannelManager<&'a M, &'b T, &'c KeysManager, &'c KeysManager, &'c KeysManager, &'d F, &'e DefaultRouter<&'f NetworkGraph<&'g L>, &'g L, &'h Mutex, &'g L>>, ProbabilisticScoringFeeParameters, ProbabilisticScorer<&'f NetworkGraph<&'g L>, &'g L>>, &'g L>; + macro_rules! define_test_pub_trait { ($vis: vis) => { /// A trivial trait which describes any [`ChannelManager`] used in testing. - #[cfg(any(test, feature = "_test_utils"))] - pub trait AChannelManager { - type Watch: chain::Watch; + $vis trait AChannelManager { + type Watch: chain::Watch + ?Sized; type M: Deref; - type Broadcaster: BroadcasterInterface; + type Broadcaster: BroadcasterInterface + ?Sized; type T: Deref; - type EntropySource: EntropySource; + type EntropySource: EntropySource + ?Sized; type ES: Deref; - type NodeSigner: NodeSigner; + type NodeSigner: NodeSigner + ?Sized; type NS: Deref; - type Signer: WriteableEcdsaChannelSigner; - type SignerProvider: SignerProvider; + type Signer: WriteableEcdsaChannelSigner + Sized; + type SignerProvider: SignerProvider + ?Sized; type SP: Deref; - type FeeEstimator: FeeEstimator; + type FeeEstimator: FeeEstimator + ?Sized; type F: Deref; - type Router: Router; + type Router: Router + ?Sized; type R: Deref; - type Logger: Logger; + type Logger: Logger + ?Sized; type L: Deref; fn get_cm(&self) -> &ChannelManager; }