From 6d1aa3773b24c6aa7de02e5b8c7f45933ef265d4 Mon Sep 17 00:00:00 2001 From: Eval EXEC Date: Mon, 24 Jun 2024 16:22:39 +0800 Subject: [PATCH] Support include tx_pool for get_live_cell --- src/rpc/ckb.rs | 2 +- src/traits/default_impls.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/ckb.rs b/src/rpc/ckb.rs index 9d97adeb..07e31661 100644 --- a/src/rpc/ckb.rs +++ b/src/rpc/ckb.rs @@ -24,7 +24,7 @@ crate::jsonrpc!(pub struct CkbRpcClient { pub fn get_epoch_by_number(&self, number: EpochNumber) -> Option; pub fn get_header(&self, hash: H256) -> Option; pub fn get_header_by_number(&self, number: BlockNumber) -> Option; - 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) -> CellWithStatus; pub fn get_tip_block_number(&self) -> BlockNumber; pub fn get_tip_header(&self) -> HeaderView; pub fn get_transaction(&self, hash: H256) -> Option; diff --git a/src/traits/default_impls.rs b/src/traits/default_impls.rs index dfde0c54..00c5288f 100644 --- a/src/traits/default_impls.rs +++ b/src/traits/default_impls.rs @@ -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!(