diff --git a/block/manager.go b/block/manager.go index 8c843442b..ed5e09062 100644 --- a/block/manager.go +++ b/block/manager.go @@ -238,7 +238,6 @@ func (m *Manager) loadFraud(path string) error { // Start starts the block manager. func (m *Manager) Start(ctx context.Context) error { - m.Ctx, m.Cancel = context.WithCancel(ctx) // Check if InitChain flow is needed if m.State.IsGenesis() { diff --git a/block/submit.go b/block/submit.go index 2caa7f390..8900b7270 100644 --- a/block/submit.go +++ b/block/submit.go @@ -241,7 +241,7 @@ func (m *Manager) CreateBatch(maxBatchSize uint64, startHeight uint64, endHeight } func (m *Manager) SubmitBatch(batch *types.Batch) error { - var daBatch = batch + daBatch := batch // a little optimized to avoid expensive clone on every batch // only clone and apply frauds if a fraud is actually specified // if fraud is specified, it's only for the DA, not for the SL diff --git a/dofraud/apply.go b/dofraud/apply.go index 2b0a167f4..4185a6248 100644 --- a/dofraud/apply.go +++ b/dofraud/apply.go @@ -6,8 +6,10 @@ import ( "github.com/dymensionxyz/dymint/types" ) -type FraudVariant = int -type FraudType = int +type ( + FraudVariant = int + FraudType = int +) // Variant const ( diff --git a/dofraud/z_test.go b/dofraud/z_test.go index ccf16e325..e83594957 100644 --- a/dofraud/z_test.go +++ b/dofraud/z_test.go @@ -38,7 +38,7 @@ func TestGenerateJson(t *testing.T) { data, err := json.MarshalIndent(examples, "", " ") require.NoError(t, err) - err = os.WriteFile(fp, data, 0644) + err = os.WriteFile(fp, data, 0o644) require.NoError(t, err) }