Skip to content

Commit

Permalink
chore: use Packet sufix
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior committed Aug 16, 2022
1 parent 97fba3b commit b6494ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/grandpa/message.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ type GrandpaMessage interface { //nolint:revive
// NewGrandpaMessage returns a new VaryingDataType to represent a GrandpaMessage
func newGrandpaMessage() scale.VaryingDataType {
return scale.MustNewVaryingDataType(
VoteMessage{}, CommitMessage{}, newVersionedNeighbourMessage(),
VoteMessage{}, CommitMessage{}, newVersionedNeighbourPacket(),
CatchUpRequest{}, CatchUpResponse{})
}

Expand Down Expand Up @@ -83,7 +83,7 @@ type VersionedNeighbourPacket scale.VaryingDataType
// Index Returns VDT index
func (VersionedNeighbourPacket) Index() uint { return 2 }

func newVersionedNeighbourMessage() VersionedNeighbourPacket {
func newVersionedNeighbourPacket() VersionedNeighbourPacket {
vdt := scale.MustNewVaryingDataType(NeighbourPacketV1{})

return VersionedNeighbourPacket(vdt)
Expand Down Expand Up @@ -120,7 +120,7 @@ func (NeighbourPacketV1) Index() uint { return 1 }

// ToConsensusMessage converts the NeighbourMessage into a network-level consensus message
func (m *NeighbourPacketV1) ToConsensusMessage() (*network.ConsensusMessage, error) {
versionedNeighbourPacket := newVersionedNeighbourMessage()
versionedNeighbourPacket := newVersionedNeighbourPacket()
err := versionedNeighbourPacket.Set(*m)
if err != nil {
return nil, fmt.Errorf("setting neighbour packet v1: %w", err)
Expand Down

0 comments on commit b6494ee

Please sign in to comment.