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

Proto encoding of gov and related modules #5493

Closed
wants to merge 11 commits into from

Conversation

aaronc
Copy link
Member

@aaronc aaronc commented Jan 8, 2020

Description


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

x/gov/types/codec.go Outdated Show resolved Hide resolved
@lgtm-com
Copy link

lgtm-com bot commented Jan 11, 2020

This pull request introduces 3 alerts when merging 347e041 into 2140244 - view on LGTM.com

new alerts:

  • 2 for Useless assignment to local variable
  • 1 for Unreachable statement

codec/codec.go Outdated Show resolved Hide resolved
x/gov/types/proposal.go Outdated Show resolved Hide resolved
x/gov/types/proposal.go Outdated Show resolved Hide resolved
x/gov/keeper/keeper.go Outdated Show resolved Hide resolved
simapp/app.go Outdated Show resolved Hide resolved
codec/codec.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jan 28, 2020

Codecov Report

Merging #5493 into master will increase coverage by 12.56%.
The diff coverage is 26.18%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #5493       +/-   ##
===========================================
+ Coverage   35.46%   48.03%   +12.56%     
===========================================
  Files         331      315       -16     
  Lines       32612    21599    -11013     
===========================================
- Hits        11567    10375     -1192     
+ Misses      19819    10425     -9394     
+ Partials     1226      799      -427
Impacted Files Coverage Δ
x/gov/types/deposit.go 0% <ø> (ø) ⬆️
x/gov/types/vote.go 15.49% <ø> (ø) ⬆️
types/coin.go 92.12% <ø> (ø) ⬆️
x/gov/types/tally.go 0% <ø> (ø) ⬆️
x/gov/types/msgs.go 33.33% <ø> (ø) ⬆️
x/gov/types/codec.pb.go 0.67% <ø> (ø)
x/gov/types/proposal.go 18.36% <0%> (-3.59%) ⬇️
x/gov/keeper/keeper.go 46.55% <100%> (+0.93%) ⬆️
types/dec_coin.go 77.44% <100%> (ø) ⬆️
x/gov/keeper/deposit.go 76.74% <100%> (ø) ⬆️
... and 276 more

x/gov/types/codec.go Outdated Show resolved Hide resolved
@@ -1,6 +1,7 @@
package keeper

import (
proto "github.com/gogo/protobuf/types"
Copy link
Contributor

Choose a reason for hiding this comment

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

File is not goimports-ed (from goimports)

Suggested change
proto "github.com/gogo/protobuf/types"

@@ -45,7 +46,8 @@ func TestProposalQueues(t *testing.T) {

activeIterator := keeper.ActiveProposalQueueIterator(ctx, proposal.VotingEndTime)
require.True(t, activeIterator.Valid())
keeper.cdc.UnmarshalBinaryLengthPrefixed(activeIterator.Value(), &proposalID)
require.Equal(t, proposalID, proposal.ProposalID)
var proposalIdWrapper proto.UInt64Value
Copy link
Contributor

Choose a reason for hiding this comment

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

var proposalIdWrapper should be proposalIDWrapper (from golint)

@alexanderbez alexanderbez mentioned this pull request Mar 2, 2020
14 tasks
@ryanchristo ryanchristo deleted the aaronc/5444-proto-gov2 branch December 12, 2022 18:16
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