Use rustc-hex instead of rustc-serialize in bloomchain tests (#7616)

This commit is contained in:
Marek Kotewicz 2018-01-18 12:37:10 +01:00 committed by Svyatoslav Nikolsky
parent 5990c64e31
commit f7012af92e
5 changed files with 9 additions and 9 deletions

2
Cargo.lock generated
View File

@ -155,7 +155,7 @@ version = "0.2.0"
dependencies = [
"ethbloom 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc-hex 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]

View File

@ -11,5 +11,5 @@ keywords = ["ethereum", "ethcore", "bloom", "chain", "filter"]
ethbloom = "0.3"
[dev-dependencies]
rustc-serialize = "0.3"
rustc-hex = "1.0"
rand = "0.4"

View File

@ -1,5 +1,5 @@
extern crate bloomchain;
extern crate rustc_serialize;
extern crate rustc_hex;
mod util;
@ -53,7 +53,7 @@ fn partly_matching_bloom_searach() {
db.insert_blooms(modified_blooms_1);
let chain = BloomChain::new(config, &db);
assert_eq!(chain.with_bloom(&(0..100), &bloom2), vec![14, 15]);
}
@ -68,7 +68,7 @@ fn bloom_replace() {
let bloom3 = Bloom::from_hex("00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let bloom4 = Bloom::from_hex("00001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let bloom5 = Bloom::from_hex("00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let modified_blooms_0 = {
let chain = BloomChain::new(config, &db);
let block_number = 14;

View File

@ -1,5 +1,5 @@
extern crate bloomchain;
extern crate rustc_serialize;
extern crate rustc_hex;
mod util;
@ -55,7 +55,7 @@ fn partly_matching_bloom_group_searach() {
db.insert_blooms(modified_blooms_1);
let chain = BloomGroupChain::new(config, &db);
assert_eq!(chain.with_bloom(&(0..100), &bloom2), vec![14, 15]);
}
@ -70,7 +70,7 @@ fn bloom_group_replace() {
let bloom3 = Bloom::from_hex("00010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let bloom4 = Bloom::from_hex("00001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let bloom5 = Bloom::from_hex("00000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
let modified_blooms_0 = {
let chain = BloomGroupChain::new(config, &db);
let block_number = 14;

View File

@ -1,4 +1,4 @@
use rustc_serialize::hex::FromHex as RustcFromHex;
use rustc_hex::FromHex as RustcFromHex;
use bloomchain::Bloom;
pub trait FromHex {