Skip to content

Commit

Permalink
Bump ckb-sdk-rust to 3.2.1
Browse files Browse the repository at this point in the history
Signed-off-by: Eval EXEC <[email protected]>
  • Loading branch information
eval-exec committed Jun 25, 2024
1 parent 6d1aa37 commit 7145173
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-sdk"
version = "3.2.0"
version = "3.2.1"
authors = [ "Linfeng Qian <[email protected]>", "Nervos Core Dev <[email protected]>" ]
edition = "2018"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 13 additions & 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, include_tx_pool: Option<bool>) -> 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<TransactionWithStatusResponse>;
Expand Down Expand Up @@ -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<CellWithStatus, crate::rpc::RpcError> {
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,
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, 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!(
Expand Down

0 comments on commit 7145173

Please sign in to comment.