From b0991ac0af482f1049783837e820577ebbb30b8e Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Tue, 17 Nov 2020 10:20:55 +0800 Subject: [PATCH 1/3] chore: Update rust toolchain to 1.46.0 --- .travis.yml | 6 +++--- azure-pipelines.yml | 4 ++-- rust-toolchain | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8bcf1a8d..99ccbcb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: rust -rust: 1.38.0 +rust: 1.46.0 dist: xenial sudo: true cache: @@ -100,7 +100,7 @@ matrix: if: 'tag IS present AND env(GITHUB_TOKEN) IS present' language: ruby addons: { apt: { packages: [] } } - env: REL_PKG=x86_64-unknown-linux-gnu.tar.gz BUILDER_IMAGE=nervos/ckb-docker-builder:xenial-rust-1.38.0 + env: REL_PKG=x86_64-unknown-linux-gnu.tar.gz BUILDER_IMAGE=nervos/ckb-docker-builder:xenial-rust-1.46.0 before_install: skip before_cache: skip cache: @@ -116,7 +116,7 @@ matrix: if: 'tag IS present AND env(GITHUB_TOKEN) IS present' language: ruby addons: { apt: { packages: [] } } - env: REL_PKG=x86_64-unknown-centos-gnu.tar.gz BUILDER_IMAGE=nervos/ckb-docker-builder:centos-7-rust-1.38.0 + env: REL_PKG=x86_64-unknown-centos-gnu.tar.gz BUILDER_IMAGE=nervos/ckb-docker-builder:centos-7-rust-1.46.0 before_install: skip before_cache: skip cache: diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 52dee456..435f9eca 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -21,7 +21,7 @@ jobs: steps: - template: devtools/azure/windows-dependencies.yml parameters: - rustup_toolchain: '1.38.0-x86_64-pc-windows-msvc' + rustup_toolchain: '1.46.0-x86_64-pc-windows-msvc' - script: make test displayName: Run unit tests env: @@ -35,7 +35,7 @@ jobs: steps: - template: devtools/azure/windows-dependencies.yml parameters: - rustup_toolchain: '1.38.0-x86_64-pc-windows-msvc' + rustup_toolchain: '1.46.0-x86_64-pc-windows-msvc' - script: make prod displayName: Build - powershell: | diff --git a/rust-toolchain b/rust-toolchain index 0fb53d6a..0a3db35b 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.45.2 +1.46.0 From 44403e5af3d92341db042ac580457a85ebec4de0 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Tue, 17 Nov 2020 10:56:35 +0800 Subject: [PATCH 2/3] chore: Update ckb to 0.38.0 --- Cargo.lock | 107 ++++++++++++++++++------------------- Cargo.toml | 22 ++++---- Makefile | 2 +- ckb-index/Cargo.toml | 4 +- ckb-index/src/util.rs | 2 +- ckb-sdk-types/Cargo.toml | 14 ++--- ckb-sdk-types/src/lib.rs | 1 + ckb-sdk/Cargo.toml | 14 ++--- ckb-sdk/src/lib.rs | 2 + plugin-protocol/Cargo.toml | 4 +- test/Cargo.toml | 12 ++--- 11 files changed, 93 insertions(+), 91 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ab18bca6..1ffd3f36 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -320,13 +320,13 @@ dependencies = [ [[package]] name = "ckb-build-info" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" [[package]] name = "ckb-chain-spec" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-crypto", "ckb-dao-utils", @@ -344,15 +344,15 @@ dependencies = [ [[package]] name = "ckb-channel" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "crossbeam-channel", ] [[package]] name = "ckb-cli" -version = "0.37.0" +version = "0.38.0" dependencies = [ "ansi_term", "atty", @@ -418,8 +418,8 @@ dependencies = [ [[package]] name = "ckb-crypto" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-fixed-hash", "failure", @@ -431,8 +431,8 @@ dependencies = [ [[package]] name = "ckb-dao-utils" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "byteorder", "ckb-error", @@ -443,19 +443,18 @@ dependencies = [ [[package]] name = "ckb-error" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-occupied-capacity", "enum-display-derive", "failure", - "quote 1.0.3", ] [[package]] name = "ckb-fixed-hash" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-fixed-hash-core", "ckb-fixed-hash-macros", @@ -463,8 +462,8 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-core" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "failure", "faster-hex 0.4.1", @@ -473,26 +472,26 @@ dependencies = [ [[package]] name = "ckb-fixed-hash-macros" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-fixed-hash-core", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "proc-macro2 1.0.24", + "quote 1.0.3", + "syn 1.0.48", ] [[package]] name = "ckb-hash" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "blake2b-rs", ] [[package]] name = "ckb-index" -version = "0.37.0" +version = "0.38.0" dependencies = [ "bincode", "ckb-rocksdb", @@ -506,8 +505,8 @@ dependencies = [ [[package]] name = "ckb-jsonrpc-types" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-types", "faster-hex 0.4.1", @@ -529,16 +528,16 @@ dependencies = [ [[package]] name = "ckb-logger" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "log 0.4.11", ] [[package]] name = "ckb-occupied-capacity" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-occupied-capacity-core", "ckb-occupied-capacity-macros", @@ -546,26 +545,26 @@ dependencies = [ [[package]] name = "ckb-occupied-capacity-core" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "serde", ] [[package]] name = "ckb-occupied-capacity-macros" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-occupied-capacity-core", - "quote 0.6.13", - "syn 0.15.44", + "quote 1.0.3", + "syn 1.0.48", ] [[package]] name = "ckb-pow" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "byteorder", "ckb-hash", @@ -577,16 +576,16 @@ dependencies = [ [[package]] name = "ckb-rational" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "numext-fixed-uint", ] [[package]] name = "ckb-resource" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-system-scripts", "ckb-types", @@ -610,8 +609,8 @@ dependencies = [ [[package]] name = "ckb-script" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "byteorder", "ckb-chain-spec", @@ -630,7 +629,7 @@ dependencies = [ [[package]] name = "ckb-sdk" -version = "0.37.0" +version = "0.38.0" dependencies = [ "aes-ctr", "bech32", @@ -661,7 +660,7 @@ dependencies = [ [[package]] name = "ckb-sdk-types" -version = "0.37.0" +version = "0.38.0" dependencies = [ "ckb-crypto", "ckb-error", @@ -688,16 +687,16 @@ dependencies = [ [[package]] name = "ckb-traits" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "ckb-types", ] [[package]] name = "ckb-types" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "bit-vec", "bytes 0.5.4", @@ -716,8 +715,8 @@ dependencies = [ [[package]] name = "ckb-util" -version = "0.37.0-pre" -source = "git+https://github.com/nervosnetwork/ckb?tag=v0.37.0-rc1#9ae4b75fd6120d186089f120143f267af1569749" +version = "0.38.0-pre" +source = "git+https://github.com/nervosnetwork/ckb?tag=v0.38.0-rc1#2fc90553e79eb5fe88db5461eb50324e588a9fc8" dependencies = [ "linked-hash-map", "parking_lot 0.7.1", diff --git a/Cargo.toml b/Cargo.toml index 75a8255e..bc5ac39f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,20 +1,20 @@ [package] name = "ckb-cli" -version = "0.37.0" +version = "0.38.0" license = "MIT" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" [dependencies] -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1", features = ["secp"] } -ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1", features = ["secp"] } +ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-util = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-dao-utils = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } ckb-sdk = { path = "ckb-sdk" } ckb-index = { path = "ckb-index" } plugin-protocol = { path = "plugin-protocol", package = "ckb-cli-plugin-protocol" } @@ -57,7 +57,7 @@ tui = "0.6.0" termion = "1.5" [build-dependencies] -ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } +ckb-build-info = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } [workspace] members = ["ckb-sdk", "ckb-index", "ckb-sdk-types", "plugin-protocol"] diff --git a/Makefile b/Makefile index be0ec8ce..8c4148c8 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ ci: fmt clippy test security-audit git diff --exit-code Cargo.lock integration: - bash devtools/ci/integration.sh v0.37.0-rc1 + bash devtools/ci/integration.sh v0.38.0-rc1 prod: ## Build binary with release profile. cargo build --release diff --git a/ckb-index/Cargo.toml b/ckb-index/Cargo.toml index 6c5de350..a5391a7f 100644 --- a/ckb-index/Cargo.toml +++ b/ckb-index/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-index" -version = "0.37.0" +version = "0.38.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -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.37.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } ckb-sdk = { path = "../ckb-sdk" } rocksdb = { package = "ckb-rocksdb", version = "=0.13.0", features = ["snappy"] } diff --git a/ckb-index/src/util.rs b/ckb-index/src/util.rs index 4cdc5a7e..3410b922 100644 --- a/ckb-index/src/util.rs +++ b/ckb-index/src/util.rs @@ -17,7 +17,7 @@ where { let path = path.as_ref().to_path_buf(); let start = Instant::now(); - let timeout = timeout.unwrap_or(Duration::from_secs(3)); + let timeout = timeout.unwrap_or_else(|| Duration::from_secs(3)); let mut options = Options::default(); options.create_if_missing(true); options.create_missing_column_families(true); diff --git a/ckb-sdk-types/Cargo.toml b/ckb-sdk-types/Cargo.toml index 9f0f90b8..f83c2bc2 100644 --- a/ckb-sdk-types/Cargo.toml +++ b/ckb-sdk-types/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-sdk-types" -version = "0.37.0" +version = "0.38.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -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.37.0-rc1" } -ckb-traits = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-traits = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-error = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } [dev-dependencies] -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1", features = ["secp"] } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1", features = ["secp"] } diff --git a/ckb-sdk-types/src/lib.rs b/ckb-sdk-types/src/lib.rs index 37f08066..b3b5f9ea 100644 --- a/ckb-sdk-types/src/lib.rs +++ b/ckb-sdk-types/src/lib.rs @@ -1 +1,2 @@ +#[allow(clippy::mutable_key_type)] pub mod transaction; diff --git a/ckb-sdk/Cargo.toml b/ckb-sdk/Cargo.toml index 2a5b9e9d..a80c7c6d 100644 --- a/ckb-sdk/Cargo.toml +++ b/ckb-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ckb-sdk" -version = "0.37.0" +version = "0.38.0" authors = ["Linfeng Qian ", "Nervos Core Dev "] edition = "2018" license = "MIT" @@ -25,10 +25,10 @@ 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.37.0-rc1" } -ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1", features = ["secp"] } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-script = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-resource = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1", features = ["secp"] } ckb-sdk-types = { path = "../ckb-sdk-types" } diff --git a/ckb-sdk/src/lib.rs b/ckb-sdk/src/lib.rs index 5f585fea..a66b6c75 100644 --- a/ckb-sdk/src/lib.rs +++ b/ckb-sdk/src/lib.rs @@ -1,6 +1,8 @@ mod chain; mod error; +#[allow(clippy::mutable_key_type)] mod transaction; +#[allow(clippy::mutable_key_type)] mod tx_helper; mod types; diff --git a/plugin-protocol/Cargo.toml b/plugin-protocol/Cargo.toml index 016213c3..f3974e51 100644 --- a/plugin-protocol/Cargo.toml +++ b/plugin-protocol/Cargo.toml @@ -8,8 +8,8 @@ edition = "2018" [dependencies] ckb-index = { path = "../ckb-index" } -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-jsonrpc-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } serde = { version = "1.0", features = ["rc"] } serde_derive = "1.0" serde_json = "1.0" diff --git a/test/Cargo.toml b/test/Cargo.toml index 1cb940b7..416c6205 100644 --- a/test/Cargo.toml +++ b/test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cli-test" -version = "0.37.0" +version = "0.38.0" authors = ["Linfeng Qian "] edition = "2018" @@ -14,11 +14,11 @@ env_logger = "0.6" toml = "0.5.0" serde_yaml = "0.8.9" ckb-sdk = { path = "../ckb-sdk" } -ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-app-config = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } -ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1", features = ["secp"] } -ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.37.0-rc1" } +ckb-types = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-app-config = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-chain-spec = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } +ckb-crypto = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1", features = ["secp"] } +ckb-hash = { git = "https://github.com/nervosnetwork/ckb", tag = "v0.38.0-rc1" } regex = "1.1.6" # Prevent this from interfering with workspaces From e5b09b1f1de46636cf8ffd3c226766894f6ce903 Mon Sep 17 00:00:00 2001 From: Linfeng Qian Date: Tue, 17 Nov 2020 11:01:22 +0800 Subject: [PATCH 3/3] feat: Add get_fork_block rpc method --- ckb-sdk/src/rpc/client.rs | 8 +++++++- src/subcommands/rpc.rs | 19 +++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/ckb-sdk/src/rpc/client.rs b/ckb-sdk/src/rpc/client.rs index 2d040d37..6aabaf09 100644 --- a/ckb-sdk/src/rpc/client.rs +++ b/ckb-sdk/src/rpc/client.rs @@ -86,6 +86,7 @@ jsonrpc!(pub struct RawHttpRpcClient { block_hash: Option ) -> TransactionProof; pub fn verify_transaction_proof(&mut self, tx_proof: TransactionProof) -> Vec; + pub fn get_fork_block(&mut self, block_hash: H256) -> Option; // Indexer pub fn deindex_lock_hash(&mut self, lock_hash: H256) -> (); @@ -145,7 +146,6 @@ jsonrpc!(pub struct RawHttpRpcClient { pub fn truncate(&mut self, target_tip_hash: H256) -> (); pub fn generate_block(&mut self, block_assembler_script: Option