Skip to content

Commit f88bb9a

Browse files
koushiroliuchengxu
authored andcommitted
replace bitcoin-rust dep with light-bitcoin (paritytech#442)
* Remove useless comment Signed-off-by: koushiro <[email protected]> * Replace bitcoin-rust with light-bitcoin Signed-off-by: koushiro <[email protected]> * Remove useless comment and cargo fmt Signed-off-by: koushiro <[email protected]> * update wasm Signed-off-by: koushiro <[email protected]> * resolve wasm conflict Signed-off-by: koushiro <[email protected]> * Update light-bitcoin dep; Resolve wasm conflict Signed-off-by: koushiro <[email protected]>
1 parent 571c307 commit f88bb9a

File tree

25 files changed

+278
-291
lines changed

25 files changed

+278
-291
lines changed

Cargo.lock

Lines changed: 113 additions & 106 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ ctrlc = { version = "3.0", features = ["termination"] }
1414
error-chain = "0.12"
1515
futures = "0.1.17"
1616

17-
# bitcoin-rust
18-
primitives = { git = "https://github.com/chainx-org/bitcoin-rust" }
19-
chain = { git = "https://github.com/chainx-org/bitcoin-rust" }
20-
keys = { git = "https://github.com/chainx-org/bitcoin-rust" }
21-
2217
[features]
2318
msgbus-redis = [
2419
"chainx-cli/msgbus-redis"

cli/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ runtime-api = { path = "../runtime-api" }
3838
xsystem = { package = "xrml-xsystem", path = "../xrml/xsystem" }
3939

4040
# bitcoin
41-
btc-primitives = { package = "primitives", git = "https://github.com/chainx-org/bitcoin-rust" }
42-
btc-chain = { package = "chain", git = "https://github.com/chainx-org/bitcoin-rust" }
41+
btc-primitives = { package = "primitives", git = "https://github.com/chainx-org/light-bitcoin" }
42+
btc-chain = { package = "chain", git = "https://github.com/chainx-org/light-bitcoin" }
4343

4444
[dev-dependencies]
4545
service-test = { package = "substrate-service-test", git = "https://github.com/chainpool/substrate" }

cli/src/genesis_config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use chainx_runtime::{
1818
};
1919

2020
use btc_chain::BlockHeader;
21-
use btc_primitives::{compact::Compact, hash::H256};
21+
use btc_primitives::{h256_from_rev_str, Compact};
2222

2323
pub enum GenesisSpec {
2424
Dev,
@@ -144,10 +144,10 @@ pub fn testnet_genesis(genesis_spec: GenesisSpec) -> GenesisConfig {
144144
let btc_genesis = (
145145
BlockHeader {
146146
version: 536870912,
147-
previous_header_hash: H256::from_reversed_str(
147+
previous_header_hash: h256_from_rev_str(
148148
"000000000000001632e4110fd57a66e3495549cc7c37350cfaf092edf20b3370",
149149
),
150-
merkle_root_hash: H256::from_reversed_str(
150+
merkle_root_hash: h256_from_rev_str(
151151
"c8bf8333e880f7439af6ca14a6f0a18806ad0d6dfa3a58df35a1c05968d3981d",
152152
),
153153
time: 1552136928,

rpc/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ xspot = { package = "xrml-xdex-spot", path = "../xrml/xdex/spot" }
4848
xbitcoin = { package = "xrml-bridge-bitcoin", path = "../xrml/xbridge/bitcoin" }
4949

5050
# bitcoin
51-
keys = { git = "https://github.com/chainx-org/bitcoin-rust" }
52-
btc_ser = { package = "serialization", git = "https://github.com/chainx-org/bitcoin-rust" }
51+
btc-keys = { package = "keys", git = "https://github.com/chainx-org/light-bitcoin" }
52+
btc-ser = { package = "serialization", git = "https://github.com/chainx-org/light-bitcoin" }
5353

5454
[dev-dependencies]
5555
assert_matches = "1.1"

rpc/src/chainx/impl_rpc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
use std::convert::Into;
44
use std::iter::FromIterator;
55

6-
use keys::{Address, DisplayLayout};
76
use parity_codec::{Decode, Encode};
87
use rustc_hex::{FromHex, ToHex};
98

@@ -13,6 +12,7 @@ use runtime_primitives::traits::{Header, ProvideRuntimeApi};
1312
use support::storage::generator::{StorageMap, StorageValue};
1413
use xassets::ChainT;
1514

15+
use btc_keys::{Address, DisplayLayout};
1616
use btc_ser::serialize as btc_serialize;
1717

1818
use runtime_api::{

0 commit comments

Comments
 (0)