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

chore(trie): update tests to always have leaves with values #2588

Merged
merged 3 commits into from
Jul 4, 2022

Conversation

qdm12
Copy link
Contributor

@qdm12 qdm12 commented Jun 6, 2022

Changes

  • In production, leaves always have a value
  • Update test cases
  • Remove leaf type check in node encoding

Tests

go test ./internal/trie/... ./lib/trie/...

Issues

Done from a comment on #2504

Primary Reviewer

@EclesioMeloJunior

@qdm12 qdm12 force-pushed the qdm12/trie/remove-empty-leaves branch from 9a3fe16 to 6502364 Compare July 4, 2022 18:01
@codecov
Copy link

codecov bot commented Jul 4, 2022

Codecov Report

Merging #2588 (6502364) into development (e7749cf) will increase coverage by 0.01%.
The diff coverage is 94.81%.

@@               Coverage Diff               @@
##           development    #2588      +/-   ##
===============================================
+ Coverage        61.97%   61.98%   +0.01%     
===============================================
  Files              215      215              
  Lines            28453    28482      +29     
===============================================
+ Hits             17634    17655      +21     
- Misses            9067     9074       +7     
- Partials          1752     1753       +1     
Flag Coverage Δ
unit-tests 61.98% <94.81%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
internal/trie/node/node.go 100.00% <ø> (ø)
lib/trie/database.go 50.62% <ø> (+0.31%) ⬆️
internal/trie/node/decode.go 91.11% <78.12%> (-4.81%) ⬇️
internal/trie/node/encode.go 93.18% <100.00%> (-0.16%) ⬇️
internal/trie/node/header.go 100.00% <100.00%> (ø)
internal/trie/node/key.go 100.00% <100.00%> (ø)
lib/common/variadic/uint32OrHash.go 31.95% <100.00%> (+2.92%) ⬆️
dot/network/inbound.go 92.98% <0.00%> (-7.02%) ⬇️
dot/network/block_announce.go 58.40% <0.00%> (-4.81%) ⬇️
dot/network/host.go 64.31% <0.00%> (-1.07%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d3282f7...6502364. Read the comment docs.

@qdm12 qdm12 merged commit 548d75a into development Jul 4, 2022
@qdm12 qdm12 deleted the qdm12/trie/remove-empty-leaves branch July 4, 2022 20:26
@github-actions
Copy link

🎉 This PR is included in version 0.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

3 participants