Skip to content

Commit

Permalink
fix linter issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
cristure committed Sep 27, 2024
1 parent 9f68130 commit 004d008
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions state/stateChanges/dataAnalysisCollector.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,7 @@ func (scc *dataAnalysisCollector) getDataAnalysisStateChangesForTxs() ([]dataAna
dataAnalysisStateChangesForTxs := make([]dataAnalysisStateChangesForTx, 0)

for _, stateChangeForTx := range stateChangesForTxs {
txHash := string(stateChangeForTx.TxHash)

cachedTx, txOk := scc.cachedTxs[txHash]
cachedTx, txOk := scc.cachedTxs[string(stateChangeForTx.TxHash)]
if !txOk {
return nil, fmt.Errorf("did not find tx in cache")
}
Expand Down
7 changes: 4 additions & 3 deletions state/stateChanges/writeCollector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ import (

data "github.com/multiversx/mx-chain-core-go/data/stateChange"
"github.com/multiversx/mx-chain-core-go/data/transaction"
"github.com/multiversx/mx-chain-go/state"
"github.com/stretchr/testify/assert"

"github.com/multiversx/mx-chain-go/state"

"github.com/stretchr/testify/require"
)

Expand Down Expand Up @@ -276,7 +277,7 @@ func TestStateChangesCollector_GetStateChangesForTx(t *testing.T) {

require.Equal(t, stateChangesForTx, map[string]*data.StateChanges{
"hash0": {
[]*data.StateChange{
StateChanges: []*data.StateChange{
{Type: "write", TxHash: []byte("hash0")},
{Type: "write", TxHash: []byte("hash0")},
{Type: "write", TxHash: []byte("hash0")},
Expand All @@ -285,7 +286,7 @@ func TestStateChangesCollector_GetStateChangesForTx(t *testing.T) {
},
},
"hash1": {
[]*data.StateChange{
StateChanges: []*data.StateChange{
{Type: "write", TxHash: []byte("hash1")},
{Type: "write", TxHash: []byte("hash1")},
{Type: "write", TxHash: []byte("hash1")},
Expand Down

0 comments on commit 004d008

Please sign in to comment.