From a1b63c3215156beaae3795fc40d6e787a7c13d22 Mon Sep 17 00:00:00 2001 From: Diego Date: Mon, 16 Dec 2024 17:54:23 +0700 Subject: [PATCH] Remove unnused linter comment --- dot/sync/warp_sync.go | 2 +- lib/grandpa/warpsync/warp_sync.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dot/sync/warp_sync.go b/dot/sync/warp_sync.go index 96a18e7667..1715eaf22c 100644 --- a/dot/sync/warp_sync.go +++ b/dot/sync/warp_sync.go @@ -111,7 +111,7 @@ func (w *WarpSyncStrategy) OnBlockAnnounce(from peer.ID, msg *network.BlockAnnou } if msg.BestBlock { - w.peers.update(from, blockAnnounceHeaderHash, uint32(msg.Number)) //nolint:gosec + w.peers.update(from, blockAnnounceHeaderHash, uint32(msg.Number)) } return &Change{ diff --git a/lib/grandpa/warpsync/warp_sync.go b/lib/grandpa/warpsync/warp_sync.go index 3c8b45fd11..9759556b8e 100644 --- a/lib/grandpa/warpsync/warp_sync.go +++ b/lib/grandpa/warpsync/warp_sync.go @@ -43,7 +43,7 @@ type GrandpaState interface { type WarpSyncVerificationResult struct { SetId grandpa.SetID - AuthorityList primitives.AuthorityList + AuthorityList grandpa.AuthorityList Header types.Header Completed bool } @@ -188,7 +188,7 @@ type SetIdAuthorityList struct { grandpa.AuthorityList } -func (p *WarpSyncProofProvider) CurrentAuthorities() (primitives.AuthorityList, error) { +func (p *WarpSyncProofProvider) CurrentAuthorities() (grandpa.AuthorityList, error) { currentSetid, err := p.grandpaState.GetCurrentSetID() if err != nil { return nil, err @@ -199,16 +199,16 @@ func (p *WarpSyncProofProvider) CurrentAuthorities() (primitives.AuthorityList, return nil, err } - var authorityList primitives.AuthorityList + var authorityList grandpa.AuthorityList for _, auth := range authorities { key, err := app.NewPublic(auth.Key[:]) if err != nil { return nil, err } - authorityList = append(authorityList, primitives.AuthorityIDWeight{ + authorityList = append(authorityList, grandpa.AuthorityIDWeight{ AuthorityID: key, - AuthorityWeight: primitives.AuthorityWeight(auth.ID), + AuthorityWeight: grandpa.AuthorityWeight(auth.ID), }) }