From 04d7ff57d29440c2d010cff1fdb10a93a2e8b6f5 Mon Sep 17 00:00:00 2001 From: manojkgorle Date: Tue, 21 Jan 2025 15:04:05 +0000 Subject: [PATCH] lint fix --- actions/auction.go | 8 ++++---- actions/rollup_register.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/actions/auction.go b/actions/auction.go index 9052271..2a755d0 100644 --- a/actions/auction.go +++ b/actions/auction.go @@ -26,10 +26,10 @@ type AuctionInfo struct { BuilderSEQAddress codec.Address `json:"builderSEQAddress"` } -func (a *AuctionInfo) HashAuctionInfo() ([32]byte, error) { - msg := binary.BigEndian.AppendUint64(nil, a.EpochNumber) - msg = binary.BigEndian.AppendUint64(msg, a.BidPrice) - msg = append(msg, a.BuilderSEQAddress[:]...) +func (info *AuctionInfo) HashAuctionInfo() ([32]byte, error) { + msg := binary.BigEndian.AppendUint64(nil, info.EpochNumber) + msg = binary.BigEndian.AppendUint64(msg, info.BidPrice) + msg = append(msg, info.BuilderSEQAddress[:]...) hash := sha256.Sum256(msg) return hash, nil } diff --git a/actions/rollup_register.go b/actions/rollup_register.go index 69298c7..c92bb38 100644 --- a/actions/rollup_register.go +++ b/actions/rollup_register.go @@ -75,7 +75,7 @@ func (r *RollupRegistration) Execute( } else { // only allow modifing informations that are not related to ExitEpoch or StartEpoch if err := authorizationChecks(ctx, actor, namespaces, r.Namespace, mu); err != nil { - return nil, fmt.Errorf("authorization failed: %s", err.Error()) + return nil, fmt.Errorf("authorization failed: %w", err) } } if r.Info.StartEpoch < Epoch(hght, rules.GetEpochLength())+2 || r.Info.ExitEpoch != 0 {