mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 07:06:42 +00:00
dev: fix: error related lint issues
This commit is contained in:
parent
6850ca4d2d
commit
79ff0c17e1
7 changed files with 7 additions and 0 deletions
|
|
@ -846,6 +846,7 @@ func (fb *filterBackend) ChainDb() ethdb.Database { return fb.db }
|
|||
func (fb *filterBackend) EventMux() *event.TypeMux { panic("not supported") }
|
||||
|
||||
func (fb *filterBackend) HeaderByNumber(ctx context.Context, number rpc.BlockNumber) (*types.Header, error) {
|
||||
// nolint : exhaustive
|
||||
switch number {
|
||||
case rpc.PendingBlockNumber:
|
||||
if block := fb.backend.pendingBlock; block != nil {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ var (
|
|||
_ rpc.DataError = new(EngineAPIError)
|
||||
)
|
||||
|
||||
// nolint : errname
|
||||
var (
|
||||
// VALID is returned by the engine API in the following calls:
|
||||
// - newPayloadV1: if the payload was already known or was just validated and executed
|
||||
|
|
|
|||
|
|
@ -378,6 +378,7 @@ func SetupGenesisBlockWithOverride(db ethdb.Database, triedb *trie.Database, gen
|
|||
return newcfg, stored, compatErr
|
||||
}
|
||||
// Don't overwrite if the old is identical to the new
|
||||
// nolint : errchkjson
|
||||
if newData, _ := json.Marshal(newcfg); !bytes.Equal(storedData, newData) {
|
||||
rawdb.WriteChainConfig(db, stored, newcfg)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -734,6 +734,7 @@ func increaseKey(key []byte) []byte {
|
|||
|
||||
// abortErr wraps an interruption signal received to represent the
|
||||
// generation is aborted by external processes.
|
||||
// nolint : errname
|
||||
type abortErr struct {
|
||||
abort chan *generatorStats
|
||||
}
|
||||
|
|
|
|||
|
|
@ -280,6 +280,7 @@ func CreateConsensusEngine(stack *node.Node, chainConfig *params.ChainConfig, et
|
|||
return bor.New(chainConfig, db, blockchainAPI, spanner, heimdallClient, genesisContractsClient, false)
|
||||
}
|
||||
} else {
|
||||
// nolint : exhaustive
|
||||
switch ethashConfig.PowMode {
|
||||
case ethash.ModeFake:
|
||||
log.Warn("Ethash used in fake mode")
|
||||
|
|
|
|||
|
|
@ -970,6 +970,7 @@ func TestTraceChain(t *testing.T) {
|
|||
t.Error("Unexpected tracing result")
|
||||
}
|
||||
for _, trace := range result.Traces {
|
||||
// nolint : errchkjson
|
||||
blob, _ := json.Marshal(trace)
|
||||
if string(blob) != single {
|
||||
t.Error("Unexpected tracing result")
|
||||
|
|
|
|||
|
|
@ -69,6 +69,7 @@ const (
|
|||
DiscUnexpectedIdentity
|
||||
DiscSelf
|
||||
DiscReadTimeout
|
||||
// nolint : errname
|
||||
DiscSubprotocolError = DiscReason(0x10)
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue