Skip to content

Commit

Permalink
Fix linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanIliev545 committed May 14, 2024
1 parent 1816e0e commit bb50e07
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions go/enclave/crosschain/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/nodetype/sequencer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions integration/simulation/transaction_injector.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit bb50e07

Please sign in to comment.