pub struct GossipVerifier<S: FutureSpawner, Blocks: Deref + Send + Sync + 'static + Clone, L: Deref + Send + Sync + 'static, Descriptor: SocketDescriptor + Send + Sync + 'static, CM: Deref + Send + Sync + 'static, OM: Deref + Send + Sync + 'static, CMH: Deref + Send + Sync + 'static, NS: Deref + Send + Sync + 'static>where
    Blocks::Target: UtxoSource,
    L::Target: Logger,
    CM::Target: ChannelMessageHandler,
    OM::Target: OnionMessageHandler,
    CMH::Target: CustomMessageHandler,
    NS::Target: NodeSigner,{ /* 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, Descriptor: SocketDescriptor + Send + Sync, CM: Deref + Send + Sync, OM: Deref + Send + Sync, CMH: Deref + Send + Sync, NS: Deref + Send + Sync> GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks::Target: UtxoSource, L::Target: Logger, CM::Target: ChannelMessageHandler, OM::Target: OnionMessageHandler, CMH::Target: CustomMessageHandler, NS::Target: NodeSigner,

source

pub fn new( source: Blocks, spawn: S, gossiper: Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>, peer_manager: Arc<PeerManager<Descriptor, CM, Arc<P2PGossipSync<Arc<NetworkGraph<L>>, Self, L>>, OM, L, CMH, NS>> ) -> Self

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, Descriptor: SocketDescriptor + Send + Sync, CM: Deref + Send + Sync, OM: Deref + Send + Sync, CMH: Deref + Send + Sync, NS: Deref + Send + Sync> Deref for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks::Target: UtxoSource, L::Target: Logger, CM::Target: ChannelMessageHandler, OM::Target: OnionMessageHandler, CMH::Target: CustomMessageHandler, NS::Target: NodeSigner,

§

type Target = GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self

Dereferences the value.
source§

impl<S: FutureSpawner, Blocks: Deref + Send + Sync + Clone, L: Deref + Send + Sync, Descriptor: SocketDescriptor + Send + Sync, CM: Deref + Send + Sync, OM: Deref + Send + Sync, CMH: Deref + Send + Sync, NS: Deref + Send + Sync> UtxoLookup for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks::Target: UtxoSource, L::Target: Logger, CM::Target: ChannelMessageHandler, OM::Target: OnionMessageHandler, CMH::Target: CustomMessageHandler, NS::Target: NodeSigner,

source§

fn get_utxo( &self, _genesis_hash: &BlockHash, short_channel_id: u64 ) -> UtxoResult

Returns the transaction output of a funding transaction encoded by short_channel_id. Returns an error if genesis_hash is for a different chain or if such a transaction output is unknown.

Auto Trait Implementations§

§

impl<S, Blocks, L, Descriptor, CM, OM, CMH, NS> RefUnwindSafe for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks: RefUnwindSafe, CM: RefUnwindSafe, CMH: RefUnwindSafe, L: RefUnwindSafe, NS: RefUnwindSafe, OM: RefUnwindSafe, S: RefUnwindSafe,

§

impl<S, Blocks, L, Descriptor, CM, OM, CMH, NS> Send for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>

§

impl<S, Blocks, L, Descriptor, CM, OM, CMH, NS> Sync for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>

§

impl<S, Blocks, L, Descriptor, CM, OM, CMH, NS> Unpin for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks: Unpin, S: Unpin,

§

impl<S, Blocks, L, Descriptor, CM, OM, CMH, NS> UnwindSafe for GossipVerifier<S, Blocks, L, Descriptor, CM, OM, CMH, NS>where Blocks: UnwindSafe, CM: RefUnwindSafe, CMH: RefUnwindSafe, L: RefUnwindSafe, NS: RefUnwindSafe, OM: RefUnwindSafe, S: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<SP, S, T> ScoreLookUp for Twhere S: ScoreLookUp<ScoreParams = SP>, T: Deref<Target = S>,

§

type ScoreParams = SP

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, short_channel_id: u64, source: &NodeId, target: &NodeId, 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
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.