mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-28 07:36:44 +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) {
|
||||
t.Parallel()
|
||||
|
||||
readFile := func(path string) {
|
||||
config, err := readConfigFile(path)
|
||||
assert.NoError(t, err)
|
||||
|
|
@ -124,11 +126,15 @@ func TestConfigLoadFile(t *testing.T) {
|
|||
|
||||
// read file in hcl format
|
||||
t.Run("hcl", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
readFile("./testdata/test.hcl")
|
||||
})
|
||||
|
||||
// read file in json format
|
||||
t.Run("json", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
readFile("./testdata/test.json")
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -920,6 +920,7 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
|
|||
|
||||
initialGasLimit := env.gasPool.Gas()
|
||||
initialTxs := txs.GetTxs()
|
||||
|
||||
var breakCause string
|
||||
|
||||
defer func() {
|
||||
|
|
@ -950,12 +951,14 @@ func (w *worker) commitTransactions(env *environment, txs *types.TransactionsByP
|
|||
inc: true,
|
||||
}
|
||||
}
|
||||
|
||||
breakCause = "interrupt"
|
||||
return atomic.LoadInt32(interrupt) == commitInterruptNewHead
|
||||
}
|
||||
// If we don't have enough gas for any further transactions then we're done
|
||||
if env.gasPool.Gas() < params.TxGas {
|
||||
log.Trace("Not enough gas for further transactions", "have", env.gasPool, "want", params.TxGas)
|
||||
|
||||
breakCause = "Not enough gas for further transactions"
|
||||
break
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue