ProvidesDecoys

Trait ProvidesDecoys 

Source
pub trait ProvidesDecoys: 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.

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.

The distribution is checked to monotonically increase.

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.

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§