diff --git a/Cargo.toml b/Cargo.toml index fc2be1b3..ca9638e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-sdk" -version = "3.2.0" +version = "3.2.1" authors = [ "Linfeng Qian ", "Nervos Core Dev " ] edition = "2018" license = "MIT" diff --git a/README.md b/README.md index b74bc965..bdc6128d 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ These features allow for seamless interaction with CKB and facilitate the develo ```toml # Cargo.toml [dependencies] -ckb-sdk = "3.2.0" +ckb-sdk = "3.2.1" ``` ## Build diff --git a/src/rpc/ckb.rs b/src/rpc/ckb.rs index 07e31661..881acee9 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, include_tx_pool: Option) -> CellWithStatus; + pub fn get_live_cell(&self, out_point: OutPoint, with_data: 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; @@ -211,6 +211,18 @@ impl CkbRpcClient { ) } + pub fn get_live_cell_with_include_tx_pool( + &self, + out_point: OutPoint, + with_data: bool, + include_tx_pool: bool, + ) -> Result { + self.post::<_, CellWithStatus>( + "get_live_cell", + (out_point, with_data, Some(include_tx_pool)), + ) + } + // get transaction with only_committed=true pub fn get_only_committed_transaction( &self, diff --git a/src/traits/default_impls.rs b/src/traits/default_impls.rs index 00c5288f..dfde0c54 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, None) + .get_live_cell(out_point.clone().into(), true) .map_err(|err| TransactionDependencyError::Other(err.into()))?; if cell_with_status.status != "live" { return Err(TransactionDependencyError::Other(anyhow!(