Skip to content

Commit

Permalink
chore: update ckb to v0.100.0-rc5 (#430)
Browse files Browse the repository at this point in the history
* chore: update ckb to v0.100.0-rc5

* fix: fix index thread is_started prediction bug
  • Loading branch information
TheWaWaR authored Sep 8, 2021
1 parent c7fe0cd commit af9dfe5
Show file tree
Hide file tree
Showing 11 changed files with 142 additions and 151 deletions.
169 changes: 80 additions & 89 deletions Cargo.lock

Large diffs are not rendered by default.

30 changes: 15 additions & 15 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
[package]
name = "ckb-cli"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
license = "MIT"
authors = ["Linfeng Qian <thewawar@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
edition = "2018"
description = "ckb command line interface"

[dependencies]
ckb-jsonrpc-types = "=0.100.0-rc2"
ckb-hash = "=0.100.0-rc2"
ckb-crypto = { version = "=0.100.0-rc2", features = ["secp"] }
ckb-build-info = "=0.100.0-rc2"
ckb-types = "=0.100.0-rc2"
ckb-util = "=0.100.0-rc2"
ckb-resource = "=0.100.0-rc2"
ckb-dao-utils = "=0.100.0-rc2"
ckb-chain-spec = "=0.100.0-rc2"
ckb-sdk = { path = "ckb-sdk", version = "=0.100.0-rc2" }
ckb-index = { path = "ckb-index", version = "=0.100.0-rc2" }
plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol", version = "=0.100.0-rc2" }
ckb-jsonrpc-types = "=0.100.0-rc5"
ckb-hash = "=0.100.0-rc5"
ckb-crypto = { version = "=0.100.0-rc5", features = ["secp"] }
ckb-build-info = "=0.100.0-rc5"
ckb-types = "=0.100.0-rc5"
ckb-util = "=0.100.0-rc5"
ckb-resource = "=0.100.0-rc5"
ckb-dao-utils = "=0.100.0-rc5"
ckb-chain-spec = "=0.100.0-rc5"
ckb-sdk = { path = "ckb-sdk", version = "=0.100.0-rc5" }
ckb-index = { path = "ckb-index", version = "=0.100.0-rc5" }
plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol", version = "=0.100.0-rc5" }
jsonrpc-core-client = "18"
jsonrpc-core = "18"
jsonrpc-derive = "18"
Expand All @@ -27,7 +27,7 @@ jsonrpc-server-utils = "18"
secp256k1 = { version = "0.19", features = ["recovery"] }
faster-hex = "0.6"
env_logger = "0.6"
crossbeam-channel = "0.3"
crossbeam-channel = "0.5.1"
clap = "=3.0.0-beta.1"
clap_generate = "=3.0.0-beta.1"
serde = { version = "1.0", features = ["derive"] }
Expand Down Expand Up @@ -61,7 +61,7 @@ tui = "0.6.0"
termion = "1.5"

[build-dependencies]
ckb-build-info = "=0.100.0-rc2"
ckb-build-info = "=0.100.0-rc5"

[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 @@ -17,7 +17,7 @@ ci: fmt clippy test security-audit
git diff --exit-code Cargo.lock

integration:
bash devtools/ci/integration.sh v0.100.0-rc2
bash devtools/ci/integration.sh v0.100.0-rc4

prod: ## Build binary with release profile.
cargo build --release
Expand Down
6 changes: 3 additions & 3 deletions ckb-index/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-index"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
authors = ["Linfeng Qian <thewawar@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
edition = "2018"
license = "MIT"
Expand All @@ -12,6 +12,6 @@ serde_derive = "1.0"
bincode = "1.1.4"
log = "0.4.6"
failure = "0.1.5"
ckb-types = "=0.100.0-rc2"
ckb-sdk = { path = "../ckb-sdk", version = "=0.100.0-rc2" }
ckb-types = "=0.100.0-rc5"
ckb-sdk = { path = "../ckb-sdk", version = "=0.100.0-rc5" }
rocksdb = { package = "ckb-rocksdb", version = "=0.15.1", features = ["snappy"] }
14 changes: 7 additions & 7 deletions ckb-sdk-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-sdk-types"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
authors = ["Linfeng Qian <thewawar@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
edition = "2018"
license = "MIT"
Expand All @@ -10,11 +10,11 @@ description = "ckb-cli sdk common types"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"

ckb-types = "=0.100.0-rc2"
ckb-traits = "=0.100.0-rc2"
ckb-jsonrpc-types = "=0.100.0-rc2"
ckb-hash = "=0.100.0-rc2"
ckb-error = "=0.100.0-rc2"
ckb-types = "=0.100.0-rc5"
ckb-traits = "=0.100.0-rc5"
ckb-jsonrpc-types = "=0.100.0-rc5"
ckb-hash = "=0.100.0-rc5"
ckb-error = "=0.100.0-rc5"

[dev-dependencies]
ckb-crypto = { version = "=0.100.0-rc2", features = ["secp"] }
ckb-crypto = { version = "=0.100.0-rc5", features = ["secp"] }
20 changes: 10 additions & 10 deletions ckb-sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-sdk"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
authors = ["Linfeng Qian <thewawar@gmail.com>", "Nervos Core Dev <dev@nervos.org>"]
edition = "2018"
license = "MIT"
Expand Down Expand Up @@ -31,12 +31,12 @@ bytes = "1"
futures = "0.3"
jsonrpc-core = "18"

ckb-types = "=0.100.0-rc2"
ckb-error = "=0.100.0-rc2"
ckb-script = "=0.100.0-rc2"
ckb-jsonrpc-types = "=0.100.0-rc2"
ckb-chain-spec = "=0.100.0-rc2"
ckb-hash = "=0.100.0-rc2"
ckb-resource = "=0.100.0-rc2"
ckb-crypto = { version = "=0.100.0-rc2", features = ["secp"] }
ckb-sdk-types = { path = "../ckb-sdk-types", version="=0.100.0-rc2" }
ckb-types = "=0.100.0-rc5"
ckb-error = "=0.100.0-rc5"
ckb-script = "=0.100.0-rc5"
ckb-jsonrpc-types = "=0.100.0-rc5"
ckb-chain-spec = "=0.100.0-rc5"
ckb-hash = "=0.100.0-rc5"
ckb-resource = "=0.100.0-rc5"
ckb-crypto = { version = "=0.100.0-rc5", features = ["secp"] }
ckb-sdk-types = { path = "../ckb-sdk-types", version="=0.100.0-rc5" }
26 changes: 13 additions & 13 deletions ckb-sdk/src/rpc/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ impl From<rpc_types::TxPoolInfo> for TxPoolInfo {

/// Transaction verbose info
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Hash, Debug)]
pub struct TxVerbosity {
pub struct TxPoolEntry {
/// Consumed cycles.
pub cycles: Uint64,
/// The transaction serialized size in block.
Expand All @@ -1042,9 +1042,9 @@ pub struct TxVerbosity {
/// Number of in-tx-pool ancestor transactions
pub ancestors_count: Uint64,
}
impl From<rpc_types::TxVerbosity> for TxVerbosity {
fn from(json: rpc_types::TxVerbosity) -> TxVerbosity {
TxVerbosity {
impl From<rpc_types::TxPoolEntry> for TxPoolEntry {
fn from(json: rpc_types::TxPoolEntry) -> TxPoolEntry {
TxPoolEntry {
cycles: json.cycles.into(),
size: json.size.into(),
fee: json.fee.into(),
Expand All @@ -1056,15 +1056,15 @@ impl From<rpc_types::TxVerbosity> for TxVerbosity {
}

#[derive(Clone, Default, Serialize, Deserialize, PartialEq, Eq, Debug)]
pub struct TxPoolVerbosity {
pub struct TxPoolEntries {
/// Pending tx verbose info
pub pending: HashMap<H256, TxVerbosity>,
pub pending: HashMap<H256, TxPoolEntry>,
/// Proposed tx verbose info
pub proposed: HashMap<H256, TxVerbosity>,
pub proposed: HashMap<H256, TxPoolEntry>,
}
impl From<rpc_types::TxPoolVerbosity> for TxPoolVerbosity {
fn from(json: rpc_types::TxPoolVerbosity) -> TxPoolVerbosity {
TxPoolVerbosity {
impl From<rpc_types::TxPoolEntries> for TxPoolEntries {
fn from(json: rpc_types::TxPoolEntries) -> TxPoolEntries {
TxPoolEntries {
pending: json
.pending
.into_iter()
Expand All @@ -1081,17 +1081,17 @@ impl From<rpc_types::TxPoolVerbosity> for TxPoolVerbosity {

/// All transactions in tx-pool.
///
/// `RawTxPool` is equivalent to [`TxPoolIds`][] `|` [`TxPoolVerbosity`][].
/// `RawTxPool` is equivalent to [`TxPoolIds`][] `|` [`TxPoolEntries`][].
///
/// [`TxPoolIds`]: struct.TxPoolIds.html
/// [`TxPoolVerbosity`]: struct.TxPoolVerbosity.html
/// [`TxPoolEntries`]: struct.TxPoolEntries.html
#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Debug)]
#[serde(untagged)]
pub enum RawTxPool {
/// verbose = false
Ids(TxPoolIds),
/// verbose = true
Verbose(TxPoolVerbosity),
Verbose(TxPoolEntries),
}

impl From<rpc_types::RawTxPool> for RawTxPool {
Expand Down
2 changes: 1 addition & 1 deletion ckb-sdk/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ impl<'a> MockTransactionHelper<'a> {
let tx_env = TxVerifyEnv::new_commit(&header);
let hardfork_switch = HardForkSwitch::new_without_any_enabled()
.as_builder()
.rfc_0232(enable_epoch_number)
.rfc_0032(enable_epoch_number)
.build()
.unwrap();
let consensus = ConsensusBuilder::default()
Expand Down
8 changes: 4 additions & 4 deletions plugin-protocol/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ckb-cli-plugin-protocol"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
authors = ["Nervos Core Dev <dev@nervos.org>"]
edition = "2018"
license = "MIT"
Expand All @@ -9,9 +9,9 @@ description = "ckb-cli plugin protocol"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
ckb-index = { path = "../ckb-index", version = "=0.100.0-rc2" }
ckb-types = "=0.100.0-rc2"
ckb-jsonrpc-types = "=0.100.0-rc2"
ckb-index = { path = "../ckb-index", version = "=0.100.0-rc5" }
ckb-types = "=0.100.0-rc5"
ckb-jsonrpc-types = "=0.100.0-rc5"
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ impl IndexThreadState {
}
}
pub fn is_started(&self) -> bool {
matches!(self, IndexThreadState::WaitToStart)
!matches!(self, IndexThreadState::WaitToStart)
}
pub fn is_stopped(&self) -> bool {
matches!(self, IndexThreadState::Stopped)
Expand Down
14 changes: 7 additions & 7 deletions test/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cli-test"
version = "0.100.0-rc2"
version = "0.100.0-rc5"
authors = ["Linfeng Qian <thewawar@gmail.com>"]
edition = "2018"

Expand All @@ -13,12 +13,12 @@ log = "0.4"
env_logger = "0.6"
toml = "0.5.0"
serde_yaml = "0.8.9"
ckb-sdk = { path = "../ckb-sdk", version = "0.100.0-rc2" }
ckb-types = "=0.100.0-rc2"
ckb-app-config = "=0.100.0-rc2"
ckb-chain-spec = "=0.100.0-rc2"
ckb-crypto = { version = "=0.100.0-rc2", features = ["secp"] }
ckb-hash = "=0.100.0-rc2"
ckb-sdk = { path = "../ckb-sdk", version = "0.100.0-rc5" }
ckb-types = "=0.100.0-rc5"
ckb-app-config = "=0.100.0-rc5"
ckb-chain-spec = "=0.100.0-rc5"
ckb-crypto = { version = "=0.100.0-rc5", features = ["secp"] }
ckb-hash = "=0.100.0-rc5"
regex = "1.1.6"

# Prevent this from interfering with workspaces
Expand Down

0 comments on commit af9dfe5

Please sign in to comment.