mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-12 23:13:45 +00:00
fix linters
This commit is contained in:
parent
abed2a501a
commit
a75eb71e48
2 changed files with 9 additions and 0 deletions
|
|
@ -102,6 +102,8 @@ func TestDefaultDatatypeOverride(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConfigLoadFile(t *testing.T) {
|
func TestConfigLoadFile(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
readFile := func(path string) {
|
readFile := func(path string) {
|
||||||
config, err := readConfigFile(path)
|
config, err := readConfigFile(path)
|
||||||
assert.NoError(t, err)
|
assert.NoError(t, err)
|
||||||
|
|
@ -124,11 +126,15 @@ func TestConfigLoadFile(t *testing.T) {
|
||||||
|
|
||||||
// read file in hcl format
|
// read file in hcl format
|
||||||
t.Run("hcl", func(t *testing.T) {
|
t.Run("hcl", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
readFile("./testdata/test.hcl")
|
readFile("./testdata/test.hcl")
|
||||||
})
|
})
|
||||||
|
|
||||||
// read file in json format
|
// read file in json format
|
||||||
t.Run("json", func(t *testing.T) {
|
t.Run("json", func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
|
|
||||||
readFile("./testdata/test.json")
|
readFile("./testdata/test.json")
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -920,6 +920,7 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
|
||||||
|
|
||||||
initialGasLimit := env.gasPool.Gas()
|
initialGasLimit := env.gasPool.Gas()
|
||||||
initialTxs := txs.GetTxs()
|
initialTxs := txs.GetTxs()
|
||||||
|
|
||||||
var breakCause string
|
var breakCause string
|
||||||
|
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|
@ -950,12 +951,14 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
|
||||||
inc: true,
|
inc: true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
breakCause = "interrupt"
|
breakCause = "interrupt"
|
||||||
return atomic.LoadInt32(interrupt) == commitInterruptNewHead
|
return atomic.LoadInt32(interrupt) == commitInterruptNewHead
|
||||||
}
|
}
|
||||||
// If we don't have enough gas for any further transactions then we're done
|
// If we don't have enough gas for any further transactions then we're done
|
||||||
if env.gasPool.Gas() < params.TxGas {
|
if env.gasPool.Gas() < params.TxGas {
|
||||||
log.Trace("Not enough gas for further transactions", "have", env.gasPool, "want", params.TxGas)
|
log.Trace("Not enough gas for further transactions", "have", env.gasPool, "want", params.TxGas)
|
||||||
|
|
||||||
breakCause = "Not enough gas for further transactions"
|
breakCause = "Not enough gas for further transactions"
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue