Skip to content

Commit a1a6125

Browse files
committed
unit tests pass
1 parent 16fb344 commit a1a6125

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/btbe.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -861,14 +861,14 @@ mod tests {
861861
let btbe_node_count = BTBE_TRIE_NODES_COUNT.load(storage).unwrap();
862862
assert_eq!(btbe_node_count, 1);
863863

864-
for i in 1..=128 {
864+
for i in 1..=64 {
865865
let canonical = deps
866866
.api
867867
.addr_canonicalize(Addr::unchecked(format!("{i}zzzzzz")).as_str())
868868
.unwrap();
869869

870870
let mut entry = StoredEntry::new(&canonical).unwrap();
871-
entry.save_hash_cache(storage).unwrap();
871+
let _ = entry.save_hash_cache(storage).unwrap();
872872

873873
assert_eq!(entry.address().unwrap(), canonical);
874874
assert_eq!(entry.balance().unwrap(), 0_u64);
@@ -893,13 +893,13 @@ mod tests {
893893
assert_eq!(bit_pos, 0);
894894
}
895895

896-
// btbe trie should split nodes when get to 129th entry
896+
// btbe trie should split nodes when get to 65th entry
897897
let canonical = deps
898898
.api
899899
.addr_canonicalize(Addr::unchecked(format!("bob")).as_str())
900900
.unwrap();
901901
let mut entry = StoredEntry::new(&canonical).unwrap();
902-
entry.save_hash_cache(storage);
902+
let _ = entry.save_hash_cache(storage);
903903
assert_eq!(entry.address().unwrap(), canonical);
904904
assert_eq!(entry.balance().unwrap(), 0_u64);
905905

@@ -948,10 +948,10 @@ mod tests {
948948
BitwiseTrieNode {
949949
left: 0,
950950
right: 0,
951-
bucket: 3,
951+
bucket: 2,
952952
}
953953
);
954-
assert_eq!(node_id, 3);
954+
assert_eq!(node_id, 2);
955955
assert_eq!(bit_pos, 1);
956956

957957
let canonical_entry = stored_entry(&deps.storage, &canonical).unwrap().unwrap();

0 commit comments

Comments
 (0)