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

Create a NodeReference abstraction for the trie #782

merged 1 commit into from Mar 14, 2019


None yet
4 participants
Copy link

commented Mar 13, 2019

Moving the lazy behavior of the trie to NodeReference helps separate concerns and simplify the trie code. It was easier through a simplification of the trie, which was stripped to be a binary trie and not an n-ary trie anymore.

These changes reduced the TrieImpl class from 940 to 746 lines, which will help future generations in understanding it.

As a side bonus, we reuse the references when operating on the trie and do not allocate memory for the arrays we previously had.

@tinchou tinchou added the unitrie label Mar 13, 2019

@tinchou tinchou requested a review from lsebrie Mar 13, 2019

@tinchou tinchou force-pushed the unitrie_nodereference branch from 0a81777 to c60dec0 Mar 14, 2019

@tinchou tinchou force-pushed the unitrie_nodereference branch from c60dec0 to 06def35 Mar 14, 2019


This comment has been minimized.

Copy link

commented Mar 14, 2019

SonarQube analysis reported 2 issues

  1. MINOR Return a copy of "value". rule
  2. INFO Class co.rsk.trie.TrieImpl 'overloads' a method with both instance and static versions rule
Copy link

left a comment

Good job 🥇

@lsebrie lsebrie merged commit ef80d2d into master Mar 14, 2019

3 checks passed

ci/circleci Your tests passed on CircleCI!
default Build finished.
sonarqube SonarQube reported 2 issues, no criticals or blockers

@lsebrie lsebrie deleted the unitrie_nodereference branch Mar 14, 2019

@aeidelman aeidelman added this to the Orchid v0.6.2 milestone Apr 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.