From 32fb1032d08fe3e624a4ed6cc7a7c8930bccdf2f Mon Sep 17 00:00:00 2001 From: Faulty Tolly <@faulttolerance.net> Date: Tue, 17 Sep 2024 14:42:47 +0200 Subject: [PATCH] fix linter --- block/block.go | 1 + block/fraud.go | 1 + block/manager.go | 3 ++- types/errors.go | 7 ++++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/block/block.go b/block/block.go index e5954101c..2538577e4 100644 --- a/block/block.go +++ b/block/block.go @@ -4,6 +4,7 @@ import ( "context" "errors" "fmt" + "github.com/dymensionxyz/dymint/fraud" errorsmod "cosmossdk.io/errors" diff --git a/block/fraud.go b/block/fraud.go index 1bdcf2f3d..e01ed4d58 100644 --- a/block/fraud.go +++ b/block/fraud.go @@ -2,6 +2,7 @@ package block import ( "context" + "github.com/dymensionxyz/dymint/node/events" uevent "github.com/dymensionxyz/dymint/utils/event" ) diff --git a/block/manager.go b/block/manager.go index 6763eeab7..a93e19cde 100644 --- a/block/manager.go +++ b/block/manager.go @@ -4,10 +4,11 @@ import ( "context" "errors" "fmt" - "github.com/dymensionxyz/dymint/fraud" "sync" "sync/atomic" + "github.com/dymensionxyz/dymint/fraud" + "github.com/dymensionxyz/gerr-cosmos/gerrc" "golang.org/x/sync/errgroup" diff --git a/types/errors.go b/types/errors.go index 486715e71..56a463d6c 100644 --- a/types/errors.go +++ b/types/errors.go @@ -3,6 +3,7 @@ package types import ( "errors" "fmt" + "github.com/dymensionxyz/dymint/fraud" "github.com/dymensionxyz/gerr-cosmos/gerrc" @@ -35,7 +36,7 @@ func NewErrFraudHeightMismatch(expected uint64, actual uint64, block *Block) err } func (e ErrFraudHeightMismatch) Error() string { - return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emited by sequencer %X:"+ + return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emitted by sequencer %X:"+ " height mismatch: state expected %d, got %d", e.headerHeight, e.headerHash, e.proposer, e.expected, e.actual) } @@ -60,7 +61,7 @@ func NewErrFraudAppHashMismatch(expected [32]byte, actual [32]byte, block *Block } func (e ErrFraudAppHashMismatch) Error() string { - return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emited by sequencer %X:"+ + return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emitted by sequencer %X:"+ " AppHash mismatch: state expected %X, got %X", e.headerHeight, e.headerHash, e.proposer, e.expected, e.headerHash) } @@ -87,7 +88,7 @@ func NewErrLastResultsHashMismatch(expected [32]byte, block *Block) error { } func (e ErrLastResultsHashMismatch) Error() string { - return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emited by sequencer %X:"+ + return fmt.Sprintf("possible fraud detected on height %d, with header hash %X, emitted by sequencer %X:"+ " LastResultsHash mismatch: state expected %X, got %X", e.headerHeight, e.headerHash, e.proposer, e.expected, e.lastResultHash) }