Skip to content

Commit

Permalink
Merge pull request #218 from philmartin2525/strict-encoding-test-crate
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-orlovsky committed Jan 25, 2022
2 parents b87e1d6 + 107e8d2 commit 64d727f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
23 changes: 17 additions & 6 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion chain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ edition = "2018"
amplify = "3.9.1"
bitcoin = "0.27.1"
bitcoin_hashes = "0.10.0"
strict_encoding = "1.7.4"
strict_encoding = "1.7.9"
strict_encoding_test = "1.7.6"
serde_crate = { package = "serde", version = "1", features = ["derive"], optional = true }
serde_with = { version = "1.8", features = ["hex"], optional = true }
lazy_static = "1.4.0" # TODO: #213 Remove dependency
Expand Down
11 changes: 6 additions & 5 deletions chain/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
extern crate amplify;
#[macro_use]
extern crate bitcoin_hashes;
#[macro_use]
extern crate strict_encoding;
#[cfg(feature = "serde")]
#[macro_use]
extern crate serde_crate as serde;
Expand All @@ -47,7 +45,8 @@ use bitcoin::hashes::{sha256d, Hash};
use bitcoin::network::constants::Network;
use bitcoin::BlockHash;
use strict_encoding::{
strict_deserialize, strict_serialize, StrictDecode, StrictEncode,
strict_decode_self, strict_deserialize, strict_encode_list,
strict_serialize, StrictDecode, StrictEncode,
};

/// P2P network magic number: prefix identifying network on which node operates
Expand Down Expand Up @@ -1002,8 +1001,10 @@ impl FromStr for Chain {

#[cfg(test)]
mod test {
#![allow(deprecated)] // TODO: #210 Refactor with strict_encoding_test crate
use strict_encoding::test_helpers::*;
use strict_encoding_test::{
test_encoding_enum, test_encoding_enum_by_values,
test_encoding_enum_u8_exhaustive, test_encoding_roundtrip,
};

use super::*;

Expand Down

0 comments on commit 64d727f

Please sign in to comment.