Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
otherview committed Nov 10, 2023
1 parent 7b33b86 commit 4991d1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions go/enclave/ethblockchain/eth_blockchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ package ethblockchain

import (
"fmt"
gethlog "github.com/ethereum/go-ethereum/log"
"github.com/obscuronet/go-obscuro/go/common/log"
"math/big"

"github.com/ethereum/go-ethereum/common"
Expand All @@ -12,12 +10,14 @@ import (
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/params"
"github.com/obscuronet/go-obscuro/go/common/gethencoding"
"github.com/obscuronet/go-obscuro/go/common/log"
"github.com/obscuronet/go-obscuro/go/enclave/components"
"github.com/obscuronet/go-obscuro/go/enclave/core"
"github.com/obscuronet/go-obscuro/go/enclave/storage"

gethcore "github.com/ethereum/go-ethereum/core"
gethtypes "github.com/ethereum/go-ethereum/core/types"
gethlog "github.com/ethereum/go-ethereum/log"
)

// EthBlockchain is an obscuro wrapper around the ethereum core.Blockchain object
Expand Down Expand Up @@ -101,7 +101,7 @@ func (e *EthBlockchain) GetBlock(_ common.Hash, number uint64) *gethtypes.Block
// StateAt returns a state database for a given root hash (generally the head).
func (e *EthBlockchain) StateAt(root common.Hash) (*state.StateDB, error) {
if root.Hex() == gethtypes.EmptyCodeHash.Hex() {
return nil, nil
return nil, nil //nolint:nilnil
}

currentBatchSeqNo := e.batchRegistry.HeadBatchSeq()
Expand All @@ -111,7 +111,7 @@ func (e *EthBlockchain) StateAt(root common.Hash) (*state.StateDB, error) {
currentBatch, err := e.storage.FetchBatchBySeqNo(currentBatchSeqNo.Uint64())
if err != nil {
e.logger.Warn("unable to get batch by height", "currentBatchSeqNo", currentBatchSeqNo, log.ErrKey, err)
return nil, nil
return nil, nil //nolint:nilnil
}

return e.storage.CreateStateDB(currentBatch.Hash())
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 @@ -159,7 +159,7 @@ func (s *sequencer) initGenesis(block *common.L1Block) error {
time.Sleep(time.Second)

if err = s.mempool.Add(msgBusTx); err != nil {
return fmt.Errorf("failed to queue message bus creation transaction to genesis - %s", err)
return fmt.Errorf("failed to queue message bus creation transaction to genesis - %w", err)
}
return nil
}
Expand Down

0 comments on commit 4991d1a

Please sign in to comment.