pub struct OffchainTransactionDependencyProvider {
pub tx_tip_num_map: HashMap<H256, u64>,
pub txs: HashMap<H256, TransactionView>,
pub cells: HashMap<(H256, u32), (CellOutput, Bytes)>,
}Expand description
offchain transaction dependency provider
Fields§
§tx_tip_num_map: HashMap<H256, u64>§txs: HashMap<H256, TransactionView>§cells: HashMap<(H256, u32), (CellOutput, Bytes)>Trait Implementations§
Source§impl Clone for OffchainTransactionDependencyProvider
impl Clone for OffchainTransactionDependencyProvider
Source§fn clone(&self) -> OffchainTransactionDependencyProvider
fn clone(&self) -> OffchainTransactionDependencyProvider
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Default for OffchainTransactionDependencyProvider
impl Default for OffchainTransactionDependencyProvider
Source§fn default() -> OffchainTransactionDependencyProvider
fn default() -> OffchainTransactionDependencyProvider
Returns the “default value” for a type. Read more
Source§impl TransactionDependencyProvider for OffchainTransactionDependencyProvider
impl TransactionDependencyProvider for OffchainTransactionDependencyProvider
fn get_transaction_async<'life0, 'life1, 'async_trait>(
&'life0 self,
tx_hash: &'life1 Byte32,
) -> Pin<Box<dyn Future<Output = Result<TransactionView, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Source§fn get_cell_async<'life0, 'life1, 'async_trait>(
&'life0 self,
out_point: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<CellOutput, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_cell_async<'life0, 'life1, 'async_trait>(
&'life0 self,
out_point: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<CellOutput, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
For get the output information of inputs or cell_deps, those cell should be live cell
Source§fn get_cell_data_async<'life0, 'life1, 'async_trait>(
&'life0 self,
out_point: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Bytes, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_cell_data_async<'life0, 'life1, 'async_trait>(
&'life0 self,
out_point: &'life1 OutPoint,
) -> Pin<Box<dyn Future<Output = Result<Bytes, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
For get the output data information of inputs or cell_deps
Source§fn get_header_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_block_hash: &'life1 Byte32,
) -> Pin<Box<dyn Future<Output = Result<HeaderView, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_header_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_block_hash: &'life1 Byte32,
) -> Pin<Box<dyn Future<Output = Result<HeaderView, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
For get the header information of header_deps
Source§fn get_block_extension_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_block_hash: &'life1 Byte32,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_block_extension_async<'life0, 'life1, 'async_trait>(
&'life0 self,
_block_hash: &'life1 Byte32,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, TransactionDependencyError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
For get_block_extension
Source§fn get_transaction(
&self,
tx_hash: &Byte32,
) -> Result<TransactionView, TransactionDependencyError>
fn get_transaction( &self, tx_hash: &Byte32, ) -> Result<TransactionView, TransactionDependencyError>
For verify certain cell belong to certain transaction
Source§fn get_cell(
&self,
out_point: &OutPoint,
) -> Result<CellOutput, TransactionDependencyError>
fn get_cell( &self, out_point: &OutPoint, ) -> Result<CellOutput, TransactionDependencyError>
For get the output information of inputs or cell_deps, those cell should be live cell
Source§fn get_cell_data(
&self,
out_point: &OutPoint,
) -> Result<Bytes, TransactionDependencyError>
fn get_cell_data( &self, out_point: &OutPoint, ) -> Result<Bytes, TransactionDependencyError>
For get the output data information of inputs or cell_deps
Source§fn get_header(
&self,
block_hash: &Byte32,
) -> Result<HeaderView, TransactionDependencyError>
fn get_header( &self, block_hash: &Byte32, ) -> Result<HeaderView, TransactionDependencyError>
For get the header information of header_deps
Source§fn get_block_extension(
&self,
block_hash: &Byte32,
) -> Result<Option<Bytes>, TransactionDependencyError>
fn get_block_extension( &self, block_hash: &Byte32, ) -> Result<Option<Bytes>, TransactionDependencyError>
For get_block_extension
Auto Trait Implementations§
impl Freeze for OffchainTransactionDependencyProvider
impl RefUnwindSafe for OffchainTransactionDependencyProvider
impl Send for OffchainTransactionDependencyProvider
impl Sync for OffchainTransactionDependencyProvider
impl Unpin for OffchainTransactionDependencyProvider
impl UnwindSafe for OffchainTransactionDependencyProvider
Blanket Implementations§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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