Skip to content

Commit 239d10a

Browse files
authored
Merge pull request #3432 from tnull/2024-11-take-verifier-by-arc
Take circular `GossipVerifier` reference by `Arc`
2 parents 529cbed + aca3979 commit 239d10a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lightning-block-sync/src/gossip.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ pub struct GossipVerifier<
144144
{
145145
source: Blocks,
146146
peer_manager_wake: Arc<dyn Fn() + Send + Sync>,
147-
gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>,
147+
gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Arc<Self>, L>>,
148148
spawn: S,
149149
block_cache: Arc<Mutex<VecDeque<(u32, Block)>>>,
150150
}
@@ -162,7 +162,7 @@ where
162162
/// This is expected to be given to a [`P2PGossipSync`] (initially constructed with `None` for
163163
/// the UTXO lookup) via [`P2PGossipSync::add_utxo_lookup`].
164164
pub fn new<APM: Deref + Send + Sync + Clone + 'static>(
165-
source: Blocks, spawn: S, gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>,
165+
source: Blocks, spawn: S, gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Arc<Self>, L>>,
166166
peer_manager: APM,
167167
) -> Self
168168
where

0 commit comments

Comments
 (0)