Enum lightning::routing::utxo::UtxoResult
source · pub enum UtxoResult {
Sync(Result<TxOut, UtxoLookupError>),
Async(UtxoFuture),
}
Expand description
The result of a UtxoLookup::get_utxo
call. A call may resolve either synchronously,
returning the Sync
variant, or asynchronously, returning an UtxoFuture
in the Async
variant.
Variants§
Sync(Result<TxOut, UtxoLookupError>)
A result which was resolved synchronously. It either includes a TxOut
for the output
requested or a UtxoLookupError
.
Async(UtxoFuture)
A result which will be resolved asynchronously. It includes a UtxoFuture
, a clone
of
which you must keep locally and call UtxoFuture::resolve
on once the lookup completes.
Note that in order to avoid runaway memory usage, the number of parallel checks is limited, but only fairly loosely. Because a pending checks block all message processing, leaving checks pending for an extended time may cause DoS of other functions. It is recommended you keep a tight timeout on lookups, on the order of a few seconds.
Trait Implementations§
source§impl Clone for UtxoResult
impl Clone for UtxoResult
source§fn clone(&self) -> UtxoResult
fn clone(&self) -> UtxoResult
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more