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: Add scale.Decoder and update lib/trie integration #1896

Merged
merged 4 commits into from
Oct 18, 2021

Conversation

timwu20
Copy link
Contributor

@timwu20 timwu20 commented Oct 14, 2021

Changes

  • Added scale.Decoder to pkg/scale, and associated constructor
  • Utilise Decoder.Decode() in remaining lib/trie integration where we need stateful decoding
  • Added tests for Decoder

Tests

go test ./pkg/scale

Issues

Primary Reviewer

@codecov
Copy link

codecov bot commented Oct 14, 2021

Codecov Report

Merging #1896 (8c250ef) into development (66ffe51) will decrease coverage by 0.01%.
The diff coverage is 70.96%.

Impacted file tree graph

@@               Coverage Diff               @@
##           development    #1896      +/-   ##
===============================================
- Coverage        59.61%   59.60%   -0.02%     
===============================================
  Files              187      187              
  Lines            19110    19129      +19     
===============================================
+ Hits             11393    11402       +9     
- Misses            5825     5832       +7     
- Partials          1892     1895       +3     
Flag Coverage Δ
unit-tests 59.60% <70.96%> (-0.02%) ⬇️

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

Impacted Files Coverage Δ
pkg/scale/decode.go 67.25% <52.63%> (+0.97%) ⬆️
lib/trie/node.go 78.92% <100.00%> (+0.28%) ⬆️
dot/network/service.go 69.27% <0.00%> (-1.16%) ⬇️
lib/blocktree/blocktree.go 55.36% <0.00%> (-1.13%) ⬇️
dot/network/connmgr.go 78.76% <0.00%> (-0.89%) ⬇️
lib/grandpa/grandpa.go 59.45% <0.00%> (-0.33%) ⬇️

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 66ffe51...8c250ef. Read the comment docs.

Copy link
Contributor

@jimjbrettj jimjbrettj left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@noot noot left a comment

Choose a reason for hiding this comment

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

looks great!

@timwu20 timwu20 merged commit 88c59ea into development Oct 18, 2021
@timwu20 timwu20 deleted the tim/scale-decoder branch October 18, 2021 21:18
@github-actions
Copy link

github-actions bot commented Dec 3, 2021

🎉 This PR is included in version 0.6.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

timwu20 added a commit to timwu20/gossamer that referenced this pull request Dec 6, 2021
…#1896)

* add Decoder, update lib/trie integration, add tests

* update tests

* add error case tests

* fix lint
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