Struct ckb_sdk::traits::offchain_impls::OffchainCellCollector
source · pub struct OffchainCellCollector {
pub locked_cells: HashSet<(H256, u32)>,
pub live_cells: Vec<LiveCell>,
pub max_mature_number: u64,
}Expand description
A cell collector only use offchain data
Fields§
§locked_cells: HashSet<(H256, u32)>§live_cells: Vec<LiveCell>§max_mature_number: u64Implementations§
Trait Implementations§
source§impl CellCollector for OffchainCellCollector
impl CellCollector for OffchainCellCollector
source§fn collect_live_cells(
&mut self,
query: &CellQueryOptions,
apply_changes: bool
) -> Result<(Vec<LiveCell>, u64), CellCollectorError>
fn collect_live_cells(
&mut self,
query: &CellQueryOptions,
apply_changes: bool
) -> Result<(Vec<LiveCell>, u64), CellCollectorError>
Collect live cells by query options, if
apply_changes is true will
mark all collected cells as dead cells.source§fn lock_cell(&mut self, out_point: OutPoint) -> Result<(), CellCollectorError>
fn lock_cell(&mut self, out_point: OutPoint) -> Result<(), CellCollectorError>
Mark this cell as dead cell
source§fn apply_tx(&mut self, tx: Transaction) -> Result<(), CellCollectorError>
fn apply_tx(&mut self, tx: Transaction) -> Result<(), CellCollectorError>
Mark all inputs as dead cells and outputs as live cells in the transaction.
source§impl Clone for OffchainCellCollector
impl Clone for OffchainCellCollector
source§fn clone(&self) -> OffchainCellCollector
fn clone(&self) -> OffchainCellCollector
Returns a copy 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 OffchainCellCollector
impl Default for OffchainCellCollector
source§fn default() -> OffchainCellCollector
fn default() -> OffchainCellCollector
Returns the “default value” for a type. Read more