From bb50e07a236aab11f1187298d233089cbb2c185f Mon Sep 17 00:00:00 2001 From: StefanIliev545 Date: Tue, 14 May 2024 13:07:48 +0300 Subject: [PATCH] Fix linter. --- go/enclave/crosschain/common.go | 4 ++-- go/enclave/nodetype/sequencer.go | 2 +- integration/simulation/transaction_injector.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/go/enclave/crosschain/common.go b/go/enclave/crosschain/common.go index 4283411b25..f19560c5d7 100644 --- a/go/enclave/crosschain/common.go +++ b/go/enclave/crosschain/common.go @@ -221,7 +221,7 @@ func (ms MessageStructs) EncodeIndex(index int, w *bytes.Buffer) { func (ms MessageStructs) ForMerkleTree() [][]interface{} { values := make([][]interface{}, 0) - for idx, _ := range ms { + for idx := range ms { hashedVal := ms.HashPacked(idx) val := []interface{}{ "message", @@ -288,7 +288,7 @@ func (vt ValueTransfers) EncodeIndex(index int, w *bytes.Buffer) { func (vt ValueTransfers) ForMerkleTree() [][]interface{} { values := make([][]interface{}, 0) - for idx, _ := range vt { + for idx := range vt { hashedVal := vt.HashPacked(idx) val := []interface{}{ "value", diff --git a/go/enclave/nodetype/sequencer.go b/go/enclave/nodetype/sequencer.go index a6352e3dbb..a0f4a6d06f 100644 --- a/go/enclave/nodetype/sequencer.go +++ b/go/enclave/nodetype/sequencer.go @@ -510,7 +510,7 @@ func (s *sequencer) ExportCrossChainData(ctx context.Context, fromSeqNo uint64, return nil, fmt.Errorf("no batches found for export of cross chain data") } - // build a merkle tree of all the batches that are valid for the cannonical L1 chain + // build a merkle tree of all the batches that are valid for the canonical L1 chain // The proof is double inclusion - one for the message being in the batch's tree and one for smtValues := crosschain.MerkleBatches(canonicalBatchesInRollup).ForMerkleTree() diff --git a/integration/simulation/transaction_injector.go b/integration/simulation/transaction_injector.go index 2954ebb94c..26dba752ea 100644 --- a/integration/simulation/transaction_injector.go +++ b/integration/simulation/transaction_injector.go @@ -347,8 +347,8 @@ func (ti *TransactionInjector) awaitAndFinalizeWithdrawal(tx *types.Transaction, return } - for k, _ := range xchainTree { - xchainTree[k][1] = gethcommon.HexToHash(xchainTree[k][1].(string)) + for k, value := range xchainTree { + xchainTree[k][1] = gethcommon.HexToHash(value[1].(string)) } tree, err := standard_merkle_tree.Of(xchainTree, crosschain.CrossChainEncodings)