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

fix: lib/trie: fix trie.NextKey #1449

Merged
merged 10 commits into from
Mar 11, 2021
Merged

fix: lib/trie: fix trie.NextKey #1449

merged 10 commits into from
Mar 11, 2021

Conversation

noot
Copy link
Contributor

@noot noot commented Mar 10, 2021

Changes

  • re-implement trie.NextKey to work properly (and handle keys not in the trie)
  • utilize trie.NextKey in runtime storage
  • tested w/ kusama blocks that previous broke and works, also greatly increases the speed

Tests

go test ./lib/trie
go test ./lib/runtime/wasmer

Checklist

  • I have read CODE_OF_CONDUCT and CONTRIBUTING
  • I have provided as much information as possible and necessary
  • I have reviewed my own pull request before requesting a review
  • All integration tests and required coverage checks are passing

Issues

lib/runtime/storage/trie.go Outdated Show resolved Hide resolved
lib/trie/trie.go Outdated Show resolved Hide resolved
lib/trie/trie.go Outdated Show resolved Hide resolved
@arijitAD
Copy link
Contributor

I have added a test for the next trie key which seems to fail.

Test Commit

Also, the test seems to fail if I add an empty string to the test case. Not sure if it's a valid scenario.

@noot noot requested a review from arijitAD March 11, 2021 16:06
@noot
Copy link
Contributor Author

noot commented Mar 11, 2021

@arijitAD I made an update so that there are no duplicate keys in the test list and looks like it's good now!

Copy link
Contributor

@arijitAD arijitAD left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved. Nice work 👌

@noot noot merged commit 64d2967 into development Mar 11, 2021
@noot noot deleted the noot/trie-next-key branch March 11, 2021 16:25
github-actions bot pushed a commit that referenced this pull request Mar 11, 2021
noot: fix: lib/trie: fix trie.NextKey (#1449)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix and enable trie.NextKey
4 participants