pub struct Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>where
Block: BlockT,
CBlock: BlockT,{
pub transaction_pool: Arc<TransactionPool>,
pub keystore: KeystorePtr,
/* private fields */
}
Expand description
Domain operator.
Fields§
§transaction_pool: Arc<TransactionPool>
§keystore: KeystorePtr
Implementations§
source§impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>where
Block: BlockT,
Block::Hash: Into<H256>,
CBlock: BlockT,
NumberFor<CBlock>: From<NumberFor<Block>> + Into<NumberFor<Block>>,
CBlock::Hash: From<Block::Hash>,
Client: HeaderBackend<Block> + BlockBackend<Block> + AuxStore + ProvideRuntimeApi<Block> + ProofProvider<Block> + Finalizer<Block, Backend> + BlockImport<Block> + BlockchainEvents<Block> + 'static,
for<'a> &'a Client: BlockImport<Block>,
Client::Api: DomainCoreApi<Block> + MessengerApi<Block, NumberFor<CBlock>, CBlock::Hash> + BlockBuilder<Block> + ApiExt<Block> + TaggedTransactionQueue<Block>,
CClient: HeaderBackend<CBlock> + HeaderMetadata<CBlock, Error = Error> + BlockBackend<CBlock> + ProvideRuntimeApi<CBlock> + ProofProvider<CBlock> + BlockchainEvents<CBlock> + Send + Sync + 'static,
CClient::Api: DomainsApi<CBlock, Block::Header> + MessengerApi<CBlock, NumberFor<CBlock>, CBlock::Hash> + BundleProducerElectionApi<CBlock, Balance> + FraudProofApi<CBlock, Block::Header> + MmrApi<CBlock, H256, NumberFor<CBlock>>,
Backend: Backend<Block> + Send + Sync + 'static,
TransactionPool: TransactionPool<Block = Block, Hash = Block::Hash> + 'static,
E: CodeExecutor,
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>where
Block: BlockT,
Block::Hash: Into<H256>,
CBlock: BlockT,
NumberFor<CBlock>: From<NumberFor<Block>> + Into<NumberFor<Block>>,
CBlock::Hash: From<Block::Hash>,
Client: HeaderBackend<Block> + BlockBackend<Block> + AuxStore + ProvideRuntimeApi<Block> + ProofProvider<Block> + Finalizer<Block, Backend> + BlockImport<Block> + BlockchainEvents<Block> + 'static,
for<'a> &'a Client: BlockImport<Block>,
Client::Api: DomainCoreApi<Block> + MessengerApi<Block, NumberFor<CBlock>, CBlock::Hash> + BlockBuilder<Block> + ApiExt<Block> + TaggedTransactionQueue<Block>,
CClient: HeaderBackend<CBlock> + HeaderMetadata<CBlock, Error = Error> + BlockBackend<CBlock> + ProvideRuntimeApi<CBlock> + ProofProvider<CBlock> + BlockchainEvents<CBlock> + Send + Sync + 'static,
CClient::Api: DomainsApi<CBlock, Block::Header> + MessengerApi<CBlock, NumberFor<CBlock>, CBlock::Hash> + BundleProducerElectionApi<CBlock, Balance> + FraudProofApi<CBlock, Block::Header> + MmrApi<CBlock, H256, NumberFor<CBlock>>,
Backend: Backend<Block> + Send + Sync + 'static,
TransactionPool: TransactionPool<Block = Block, Hash = Block::Hash> + 'static,
E: CodeExecutor,
sourcepub async fn new<IBNS, CIBNS, NSNS, ASS, CNR>(
spawn_essential: Box<dyn SpawnEssentialNamed>,
params: OperatorParams<Block, CBlock, Client, CClient, TransactionPool, Backend, E, IBNS, CIBNS, NSNS, ASS, CNR>,
) -> Result<Self, Error>where
IBNS: Stream<Item = (NumberFor<CBlock>, Sender<()>)> + Send + Unpin + 'static,
CIBNS: Stream<Item = BlockImportNotification<CBlock>> + Send + Unpin + 'static,
NSNS: Stream<Item = (Slot, PotOutput)> + Send + 'static,
ASS: Stream<Item = Sender<()>> + Send + 'static,
CNR: NetworkRequest + Send + Sync + 'static,
pub async fn new<IBNS, CIBNS, NSNS, ASS, CNR>(
spawn_essential: Box<dyn SpawnEssentialNamed>,
params: OperatorParams<Block, CBlock, Client, CClient, TransactionPool, Backend, E, IBNS, CIBNS, NSNS, ASS, CNR>,
) -> Result<Self, Error>where
IBNS: Stream<Item = (NumberFor<CBlock>, Sender<()>)> + Send + Unpin + 'static,
CIBNS: Stream<Item = BlockImportNotification<CBlock>> + Send + Unpin + 'static,
NSNS: Stream<Item = (Slot, PotOutput)> + Send + 'static,
ASS: Stream<Item = Sender<()>> + Send + 'static,
CNR: NetworkRequest + Send + Sync + 'static,
Create a new instance.
pub fn fraud_proof_generator( &self, ) -> FraudProofGenerator<Block, CBlock, Client, CClient, Backend, E>
sourcepub fn import_notification_stream(
&self,
) -> DomainImportNotifications<Block, CBlock>
pub fn import_notification_stream( &self, ) -> DomainImportNotifications<Block, CBlock>
Get system domain block import notification stream.
NOTE: Unlike BlockchainEvents::import_notification_stream()
, this notification won’t be
fired until the system domain block’s receipt processing is done.
Trait Implementations§
Auto Trait Implementations§
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Freeze for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> !RefUnwindSafe for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Send for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Sync for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> Unpin for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
impl<Block, CBlock, Client, CClient, TransactionPool, Backend, E> !UnwindSafe for Operator<Block, CBlock, Client, CClient, TransactionPool, Backend, E>
Blanket Implementations§
§impl<T> AnySync for T
impl<T> AnySync for T
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
§fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
fn checked_from<T>(t: T) -> Option<Self>where
Self: TryFrom<T>,
§fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
fn checked_into<T>(self) -> Option<T>where
Self: TryInto<T>,
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> IsType<T> for T
impl<T> IsType<T> for T
§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
Consume self to return an equivalent value of
T
. Read more§impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
impl<T, U> TryIntoKey<U> for Twhere
U: TryFromKey<T>,
type Error = <U as TryFromKey<T>>::Error
fn try_into_key(self) -> Result<U, <U as TryFromKey<T>>::Error>
§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
The counterpart to
unchecked_from
.§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
Consume self to return an equivalent value of
T
.