Skip to content

Commit

Permalink
Support include tx_pool for get_live_cell
Browse files Browse the repository at this point in the history
  • Loading branch information
eval-exec committed Jun 24, 2024
1 parent 1a786c3 commit 6d1aa37
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/rpc/ckb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ crate::jsonrpc!(pub struct CkbRpcClient {
pub fn get_epoch_by_number(&self, number: EpochNumber) -> Option<EpochView>;
pub fn get_header(&self, hash: H256) -> Option<HeaderView>;
pub fn get_header_by_number(&self, number: BlockNumber) -> Option<HeaderView>;
pub fn get_live_cell(&self, out_point: OutPoint, with_data: bool) -> CellWithStatus;
pub fn get_live_cell(&self, out_point: OutPoint, with_data: bool, include_tx_pool: Option<bool>) -> CellWithStatus;
pub fn get_tip_block_number(&self) -> BlockNumber;
pub fn get_tip_header(&self) -> HeaderView;
pub fn get_transaction(&self, hash: H256) -> Option<TransactionWithStatusResponse>;
Expand Down
2 changes: 1 addition & 1 deletion src/traits/default_impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ impl DefaultTransactionDependencyProvider {

let cell_with_status = inner
.rpc_client
.get_live_cell(out_point.clone().into(), true)
.get_live_cell(out_point.clone().into(), true, None)
.map_err(|err| TransactionDependencyError::Other(err.into()))?;
if cell_with_status.status != "live" {
return Err(TransactionDependencyError::Other(anyhow!(
Expand Down

0 comments on commit 6d1aa37

Please sign in to comment.