ProvidesUnvalidatedDecoys

Trait ProvidesUnvalidatedDecoys 

Source
pub trait ProvidesUnvalidatedDecoys: ProvidesBlockchainMeta {
    // Required methods
    fn ringct_output_distribution(
        &self,
        range: impl Send + RangeBounds<usize>,
    ) -> impl Send + Future<Output = Result<Vec<u64>, InterfaceError>>;
    fn unlocked_ringct_outputs(
        &self,
        indexes: &[u64],
        evaluate_unlocked: EvaluateUnlocked,
    ) -> impl Send + Future<Output = Result<Vec<Option<[Point; 2]>>, TransactionsError>>;
}
Expand description

Provides the necessary data to select decoys, without validating it.

This SHOULD be satisfied by a local store to prevent attack by malicious remote nodes.

Required Methods§

Source

fn ringct_output_distribution( &self, range: impl Send + RangeBounds<usize>, ) -> impl Send + Future<Output = Result<Vec<u64>, InterfaceError>>

Get the distribution of RingCT outputs.

range is in terms of block numbers. The result may be smaller than the requested range if the range starts before RingCT outputs were created on-chain.

No validation of the distribution is performed.

Source

fn unlocked_ringct_outputs( &self, indexes: &[u64], evaluate_unlocked: EvaluateUnlocked, ) -> impl Send + Future<Output = Result<Vec<Option<[Point; 2]>>, TransactionsError>>

Get the specified RingCT outputs, but only return them if they’re unlocked.

No validation of the outputs is performed other than confirming the correct amount is returned.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§