Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor stream implementation #499

Closed
wants to merge 66 commits into from
Closed
Show file tree
Hide file tree
Changes from 56 commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
896e8bd
WIP
Jan 11, 2024
0e96883
WIP
Jan 11, 2024
6c6581c
WIP
Jan 12, 2024
9669108
WIP
Jan 12, 2024
53a3f41
WIP
Jan 12, 2024
1ea329e
WIP
Jan 12, 2024
c721e64
compiles
Jan 12, 2024
84163c8
put child index in key
Jan 12, 2024
dd050e7
make key vector in node iterator
Jan 13, 2024
56ab548
no-op implementation for iterator initialization
Jan 13, 2024
8c3af4a
cleanup; add test no_start_key
Jan 13, 2024
49a93c6
improve no_start_key test
Jan 13, 2024
4a68282
use get_children_iter helper
Jan 13, 2024
009bfe9
add comment
Jan 13, 2024
b8dddb4
comments and cleanup
Jan 13, 2024
54fa043
comments and cleanup
Jan 13, 2024
8dfd728
WIP
Jan 13, 2024
082a797
comment WIP code
Jan 14, 2024
fe2de9b
uncomment WIP code
Jan 14, 2024
0105df4
Merge remote-tracking branch 'origin/main' into fix-stream-3
Jan 29, 2024
e3e5adc
WIP fixing initialization code
Jan 29, 2024
c1fd906
WIP fixing initialization code
Jan 29, 2024
66a715e
18 of 20 UT pass
Jan 29, 2024
9b82d90
readability nit
Jan 29, 2024
902afe0
nit remove useless assignment
Jan 29, 2024
580762a
comments and nits
Jan 30, 2024
bdfd326
all UT pass
Jan 30, 2024
a8a5cf8
appease linter
Jan 30, 2024
4d06a49
check for index OOB (which should never happen)
Jan 30, 2024
3a28208
clean up branch node logic in setup
Jan 30, 2024
0fe8baa
comment nit
Jan 30, 2024
5601931
cleanup
Jan 30, 2024
a67f533
remove unwrap calls
Jan 30, 2024
00cc302
remove unwrap call
Jan 30, 2024
d1fffc8
remove unwrap call
Jan 30, 2024
039200a
appease linter
Jan 30, 2024
8dc0e1e
appease linter
Jan 30, 2024
3206ee1
comment nit
Jan 30, 2024
b3f742a
Merge branch 'main' into fix-stream-3
Jan 30, 2024
0717dfd
Merge branch 'fix-stream-3' of github.com:ava-labs/firewood into fix-…
Jan 30, 2024
3644181
/// for doc comments
Jan 30, 2024
f4f40ec
use type inference instead of declaring
Jan 30, 2024
99814b9
style nits from PR comments
Jan 30, 2024
4889c7a
appease linter
Jan 30, 2024
518593e
Merge branch 'main' into fix-stream-3
Jan 30, 2024
d50db37
convert loop to while let Some
Jan 30, 2024
c24c665
remove commented code; change match arm with if statement into 2 matc…
Jan 31, 2024
d6c0781
remove unused import
Jan 31, 2024
f47d748
nit move comments
Jan 31, 2024
cf0936c
change match arm with if statement into 2 match arms
Jan 31, 2024
9b4eb4b
use PartialOrd instead of custom closure
Jan 31, 2024
620fd21
let compiler infer type
Jan 31, 2024
ec47862
remove use of vecdeque
Jan 31, 2024
001874b
appease linter
Jan 31, 2024
c5b87fd
Merge remote-tracking branch 'origin/main' into fix-stream-3
Jan 31, 2024
e0728ee
Merge remote-tracking branch 'origin/main' into fix-stream-3
Feb 1, 2024
6f2de3c
separate out initialization of key state into function
Feb 2, 2024
a32e770
naming nits
Feb 2, 2024
7799284
&mut --> &
Feb 2, 2024
15eaa77
appease linter
Feb 2, 2024
ba65fda
rename error
Feb 2, 2024
d3f519f
appease linter
Feb 2, 2024
9f82812
remove errantly added WIP code
Feb 2, 2024
60c6c39
test cleanup
Feb 2, 2024
25cbdbb
fix upper loop bound in test
Feb 2, 2024
1752650
Merge branch 'main' into fix-stream-3
Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion firewood/src/merkle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1181,7 +1181,8 @@ impl<S: ShaleStore<Node> + Send + Sync, T> Merkle<S, T> {
node_ref = self.get_node(next_ptr)?;
}

// when we're done iterating over nibbles, check if the node we're at has a value
// We're done iterating over nibbles.
// Check if the node we're at has a value.
let node_ref = match &node_ref.inner {
NodeType::Branch(n) if n.value.as_ref().is_some() => Some(node_ref),
NodeType::Leaf(n) if n.path.len() == 0 => Some(node_ref),
Expand Down
Loading
Loading