mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
core/vm: golint fixes
This commit is contained in:
parent
231be4fde8
commit
40c5796084
4 changed files with 6 additions and 4 deletions
|
|
@ -81,8 +81,8 @@ func enable1344(jt *JumpTable) {
|
|||
|
||||
// opChainID implements CHAINID opcode
|
||||
func opChainID(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory *Memory, stack *Stack) ([]byte, error) {
|
||||
chainId := interpreter.intPool.get().Set(interpreter.evm.chainConfig.ChainID)
|
||||
stack.push(chainId)
|
||||
chainID := interpreter.intPool.get().Set(interpreter.evm.chainConfig.ChainID)
|
||||
stack.push(chainID)
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -914,7 +914,7 @@ func opPush1(pc *uint64, interpreter *EVMInterpreter, contract *Contract, memory
|
|||
codeLen = uint64(len(contract.Code))
|
||||
integer = interpreter.intPool.get()
|
||||
)
|
||||
*pc += 1
|
||||
*pc++
|
||||
if *pc < codeLen {
|
||||
stack.push(integer.SetUint64(uint64(contract.Code[*pc])))
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common/math"
|
||||
)
|
||||
|
||||
// JSONLogger is a struct with a json encoder and logging configuration
|
||||
type JSONLogger struct {
|
||||
encoder *json.Encoder
|
||||
cfg *LogConfig
|
||||
|
|
@ -41,6 +42,7 @@ func NewJSONLogger(cfg *LogConfig, writer io.Writer) *JSONLogger {
|
|||
return l
|
||||
}
|
||||
|
||||
// CaptureStart is triggered at start of execution.
|
||||
func (l *JSONLogger) CaptureStart(from common.Address, to common.Address, create bool, input []byte, gas uint64, value *big.Int) error {
|
||||
return nil
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ func (m *Memory) Resize(size uint64) {
|
|||
}
|
||||
}
|
||||
|
||||
// Get returns offset + size as a new slice
|
||||
// GetCopy returns offset + size as a new slice
|
||||
func (m *Memory) GetCopy(offset, size int64) (cpy []byte) {
|
||||
if size == 0 {
|
||||
return nil
|
||||
|
|
|
|||
Loading…
Reference in a new issue