Struct lightning_block_sync::gossip::GossipVerifier
source · pub struct GossipVerifier<S: FutureSpawner, Blocks: Deref + Send + Sync + 'static + Clone, L: Deref + Send + Sync + 'static>{ /* private fields */ }
Expand description
A struct which wraps a UtxoSource
and a few LDK objects and implements the LDK
UtxoLookup
trait.
Note that if you’re using this against a Bitcoin Core REST or RPC server, you likely wish to
increase the rpcworkqueue
setting in Bitcoin Core as LDK attempts to parallelize requests (a
value of 1024 should more than suffice), and ensure you have sufficient file descriptors
available on both Bitcoin Core and your LDK application for each request to hold its own
connection.
Implementations§
source§impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> GossipVerifier<S, Blocks, L>
impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> GossipVerifier<S, Blocks, L>
sourcepub fn new<APM: Deref + Send + Sync + Clone + 'static>(
source: Blocks,
spawn: S,
gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>,
peer_manager: APM
) -> Selfwhere
APM::Target: APeerManager,
pub fn new<APM: Deref + Send + Sync + Clone + 'static>(
source: Blocks,
spawn: S,
gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>,
peer_manager: APM
) -> Selfwhere
APM::Target: APeerManager,
Constructs a new GossipVerifier
.
This is expected to be given to a P2PGossipSync
(initially constructed with None
for
the UTXO lookup) via P2PGossipSync::add_utxo_lookup
.
Trait Implementations§
source§impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> Deref for GossipVerifier<S, Blocks, L>
impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> Deref for GossipVerifier<S, Blocks, L>
source§impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> UtxoLookup for GossipVerifier<S, Blocks, L>
impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync> UtxoLookup for GossipVerifier<S, Blocks, L>
source§fn get_utxo(&self, _chain_hash: &ChainHash, short_channel_id: u64) -> UtxoResult
fn get_utxo(&self, _chain_hash: &ChainHash, short_channel_id: u64) -> UtxoResult
Returns the transaction output of a funding transaction encoded by
short_channel_id
.
Returns an error if chain_hash
is for a different chain or if such a transaction output is
unknown.Auto Trait Implementations§
impl<S, Blocks, L> Freeze for GossipVerifier<S, Blocks, L>
impl<S, Blocks, L> !RefUnwindSafe for GossipVerifier<S, Blocks, L>
impl<S, Blocks, L> Send for GossipVerifier<S, Blocks, L>
impl<S, Blocks, L> Sync for GossipVerifier<S, Blocks, L>
impl<S, Blocks, L> Unpin for GossipVerifier<S, Blocks, L>
impl<S, Blocks, L> !UnwindSafe for GossipVerifier<S, Blocks, L>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<S, T> ScoreLookUp for Twhere
S: ScoreLookUp,
T: Deref<Target = S>,
impl<S, T> ScoreLookUp for Twhere
S: ScoreLookUp,
T: Deref<Target = S>,
§type ScoreParams = <S as ScoreLookUp>::ScoreParams
type ScoreParams = <S as ScoreLookUp>::ScoreParams
A configurable type which should contain various passed-in parameters for configuring the scorer,
on a per-routefinding-call basis through to the scorer methods,
which are used to determine the parameters for the suitability of channels for use.
source§fn channel_penalty_msat(
&self,
candidate: &CandidateRouteHop<'_>,
usage: ChannelUsage,
score_params: &<T as ScoreLookUp>::ScoreParams
) -> u64
fn channel_penalty_msat( &self, candidate: &CandidateRouteHop<'_>, usage: ChannelUsage, score_params: &<T as ScoreLookUp>::ScoreParams ) -> u64
Returns the fee in msats willing to be paid to avoid routing
send_amt_msat
through the
given channel in the direction from source
to target
. Read more