Skip to content

Commit

Permalink
Merge pull request #5 from gskapka/dev
Browse files Browse the repository at this point in the history
feat(repo): adds new test vector & fixes rlp-code bug
  • Loading branch information
techcircus authored Jan 12, 2020
2 parents c39a0ad + dd2ab4f commit 6e1bc31
Show file tree
Hide file tree
Showing 337 changed files with 625 additions and 34 deletions.
79 changes: 79 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ serde_derive = "1.0.94"
ethereum-types = "0.6.0"
serial_test_derive = "0.1"

simple_logger = "1.3.0"

[dev-dependencies]
serial_test = "0.1"
18 changes: 9 additions & 9 deletions src/get_hex_proof_from_branch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ mod tests {
use crate::get_branch_from_trie::get_branch_from_trie;
use crate::test_utils::{
PROOF_1_INDEX,
PROOF_2_INDEX,
PROOF_3_INDEX,
get_sample_proof_1,
get_sample_proof_2,
get_sample_proof_3,
get_sample_tx_hashes_1,
get_sample_tx_hashes_2,
get_sample_tx_hashes_3,
SAMPLE_RECEIPT_JSONS_1_PATH,
SAMPLE_RECEIPT_JSONS_2_PATH,
SAMPLE_RECEIPT_JSONS_3_PATH,
get_sample_trie_with_sample_receipts,
get_valid_state_with_receipts_trie_index_and_branch,
};
Expand All @@ -64,13 +64,13 @@ mod tests {
}

#[test]
fn should_get_hex_proof_2_from_branch() {
let expected_result = get_sample_proof_2();
fn should_get_hex_proof_3_from_branch() {
let expected_result = get_sample_proof_3();
let trie = get_sample_trie_with_sample_receipts(
SAMPLE_RECEIPT_JSONS_2_PATH.to_string(),
get_sample_tx_hashes_2()
SAMPLE_RECEIPT_JSONS_3_PATH.to_string(),
get_sample_tx_hashes_3()
);
let branch = get_branch_from_trie(trie, PROOF_2_INDEX)
let branch = get_branch_from_trie(trie, PROOF_3_INDEX)
.unwrap();
let result = get_hex_proof_from_branch(&branch)
.unwrap();
Expand Down
Loading

0 comments on commit 6e1bc31

Please sign in to comment.