Skip to content

Commit

Permalink
chore: Update ckb to v0.39.0-rc2
Browse files Browse the repository at this point in the history
  • Loading branch information
TheWaWaR committed Dec 17, 2020
1 parent b6ce3c6 commit abb370b
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 66 deletions.
63 changes: 33 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 10 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ authors = ["Linfeng Qian <[email protected]>", "Nervos Core Dev <[email protected]
edition = "2018"

[dependencies]
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1", features = ["secp"] }
ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2", features = ["secp"] }
ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-sdk = { path = "ckb-sdk" }
ckb-index = { path = "ckb-index" }
plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol" }
Expand Down Expand Up @@ -57,7 +57,7 @@ tui = "0.6.0"
termion = "1.5"

[build-dependencies]
ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }

[workspace]
members = ["ckb-sdk", "ckb-index", "ckb-sdk-types", "plugin-protocol"]
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ci: fmt clippy test security-audit
git diff --exit-code Cargo.lock

integration:
bash devtools/ci/integration.sh v0.39.0-rc1
bash devtools/ci/integration.sh v0.39.0-rc2

prod: ## Build binary with release profile.
cargo build --release
Expand Down
2 changes: 1 addition & 1 deletion ckb-index/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ serde_derive = "1.0"
bincode = "1.1.4"
log = "0.4.6"
failure = "0.1.5"
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-sdk = { path = "../ckb-sdk" }
rocksdb = { package = "ckb-rocksdb", version = "=0.13.0", features = ["snappy"] }
12 changes: 6 additions & 6 deletions ckb-sdk-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ license = "MIT"
serde = { version = "1.0", features = ["rc"] }
serde_derive = "1.0"

ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-traits = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-traits = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }

[dev-dependencies]
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1", features = ["secp"] }
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2", features = ["secp"] }
10 changes: 8 additions & 2 deletions ckb-sdk-types/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,18 +221,24 @@ impl CellProvider for Resource {
}

impl CellDataProvider for Resource {
fn load_cell_data(&self, cell: &CellMeta) -> Option<(Bytes, Byte32)> {
fn load_cell_data(&self, cell: &CellMeta) -> Option<Bytes> {
cell.mem_cell_data
.as_ref()
.map(ToOwned::to_owned)
.or_else(|| self.get_cell_data(&cell.out_point))
}

fn get_cell_data(&self, out_point: &OutPoint) -> Option<(Bytes, Byte32)> {
fn get_cell_data(&self, out_point: &OutPoint) -> Option<Bytes> {
self.required_cells
.get(out_point)
.and_then(|cell_meta| cell_meta.mem_cell_data.clone())
}

fn get_cell_data_hash(&self, out_point: &OutPoint) -> Option<Byte32> {
self.required_cells
.get(out_point)
.and_then(|cell_meta| cell_meta.mem_cell_data_hash.clone())
}
}

impl HeaderProvider for Resource {
Expand Down
13 changes: 7 additions & 6 deletions ckb-sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ uuid = { version = "0.7.4", features = ["v4"] }
chrono = "0.4.6"
failure = "0.1.5"

ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1" }
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc1", features = ["secp"] }
ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2" }
ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.39.0-rc2", features = ["secp"] }
ckb-sdk-types = { path = "../ckb-sdk-types" }
Loading

0 comments on commit abb370b

Please sign in to comment.