Skip to content

Commit

Permalink
Update light-bitcoin (paritytech#294)
Browse files Browse the repository at this point in the history
Signed-off-by: koushiro <[email protected]>
  • Loading branch information
koushiro committed Oct 16, 2020
1 parent 222bf9c commit 69f3f84
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 63 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions cli/src/res.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright 2019-2020 ChainX Project Authors. Licensed under GPL-3.0.

use chainx_runtime::{h256_conv_endian_from_str, BtcCompact, BtcHeader, BtcNetwork};
use chainx_runtime::{h256_rev, BtcCompact, BtcHeader, BtcNetwork};

#[derive(Debug, serde::Deserialize)]
struct BitcoinGenesisHeader {
Expand Down Expand Up @@ -31,7 +31,7 @@ pub struct BitcoinParams {
}

fn build_bitcoin_params(raw: BitcoinGenesisHeader, confirmed_count: u32) -> BitcoinParams {
let as_h256 = |s: &str| h256_conv_endian_from_str(s);
let as_h256 = |s: &str| h256_rev(s);
BitcoinParams {
genesis_info: (
BtcHeader {
Expand Down
2 changes: 1 addition & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ pub use xpallet_assets::{
AssetInfo, AssetRestrictions, AssetType, Chain, TotalAssetInfo, WithdrawalLimit,
};
#[cfg(feature = "std")]
pub use xpallet_gateway_bitcoin::h256_conv_endian_from_str;
pub use xpallet_gateway_bitcoin::h256_rev;
pub use xpallet_gateway_bitcoin::{
BtcHeader, BtcNetwork, BtcParams, BtcTxVerifier, Compact as BtcCompact, H256 as BtcHash,
};
Expand Down
2 changes: 1 addition & 1 deletion xpallets/gateway/bitcoin/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ xpallet-support = { path = "../../support", default-features = false }
xpallet-gateway-common = { path = "../common", default-features = false }
xpallet-gateway-records = { path = "../records", default-features = false }

light-bitcoin = { git = "https://github.com/chainx-org/light-bitcoin", branch = "v2", default-features = false }
light-bitcoin = { git = "https://github.com/chainx-org/light-bitcoin", branch = "master", default-features = false }

[dev-dependencies]
lazy_static = "1.4"
Expand Down
2 changes: 1 addition & 1 deletion xpallets/gateway/bitcoin/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ use xpallet_support::{debug, ensure_with_errorlog, error, info, str, try_addr};

// light-bitcoin
#[cfg(feature = "std")]
pub use light_bitcoin::primitives::h256_conv_endian_from_str;
pub use light_bitcoin::primitives::h256_rev;
pub use light_bitcoin::{
chain::BlockHeader as BtcHeader,
keys::Network as BtcNetwork,
Expand Down
2 changes: 1 addition & 1 deletion xpallets/gateway/bitcoin/src/tests/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ pub fn reverse_h256(mut hash: H256) -> H256 {

#[cfg(test)]
pub fn as_h256(s: &str) -> H256 {
h256_conv_endian_from_str(s)
h256_rev(s)
}

#[cfg(test)]
Expand Down
Loading

0 comments on commit 69f3f84

Please sign in to comment.