require 5 for post
This commit is contained in:
parent
399256b384
commit
d02024929a
@ -23,8 +23,7 @@ import (
|
|||||||
|
|
||||||
const (
|
const (
|
||||||
seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt"
|
seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt"
|
||||||
//seedNodeAddress = "54.76.56.74:30303"
|
seedNodeAddress = "54.76.56.74:30303"
|
||||||
seedNodeAddress = "localhost:30303"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var ethlogger = ethlog.NewLogger("SERV")
|
var ethlogger = ethlog.NewLogger("SERV")
|
||||||
|
11
ethvm/vm.go
11
ethvm/vm.go
@ -63,7 +63,7 @@ func New(env Environment) *Vm {
|
|||||||
lt = LogTyDiff
|
lt = LogTyDiff
|
||||||
}
|
}
|
||||||
|
|
||||||
return &Vm{env: env, logTy: lt, Recoverable: false, queue: list.New()}
|
return &Vm{env: env, logTy: lt, Recoverable: true, queue: list.New()}
|
||||||
}
|
}
|
||||||
|
|
||||||
func calcMemSize(off, l *big.Int) *big.Int {
|
func calcMemSize(off, l *big.Int) *big.Int {
|
||||||
@ -200,7 +200,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
|
|||||||
|
|
||||||
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2])
|
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2])
|
||||||
case CALLDATACOPY:
|
case CALLDATACOPY:
|
||||||
require(3)
|
require(2)
|
||||||
|
|
||||||
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3])
|
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3])
|
||||||
case CODECOPY:
|
case CODECOPY:
|
||||||
@ -210,7 +210,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
|
|||||||
case EXTCODECOPY:
|
case EXTCODECOPY:
|
||||||
require(4)
|
require(4)
|
||||||
|
|
||||||
newMemSize = calcMemSize(stack.data[stack.Len()-1], stack.data[stack.Len()-4])
|
newMemSize = calcMemSize(stack.data[stack.Len()-2], stack.data[stack.Len()-4])
|
||||||
case CALL, CALLSTATELESS:
|
case CALL, CALLSTATELESS:
|
||||||
require(7)
|
require(7)
|
||||||
gas.Set(GasCall)
|
gas.Set(GasCall)
|
||||||
@ -832,7 +832,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case POST:
|
case POST:
|
||||||
require(6)
|
require(5)
|
||||||
|
|
||||||
self.Endl()
|
self.Endl()
|
||||||
|
|
||||||
@ -872,6 +872,9 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
|
|||||||
default:
|
default:
|
||||||
vmlogger.Debugf("(pc) %-3v Invalid opcode %x\n", pc, op)
|
vmlogger.Debugf("(pc) %-3v Invalid opcode %x\n", pc, op)
|
||||||
|
|
||||||
|
// XXX Really?
|
||||||
|
closure.UseGas(closure.Gas)
|
||||||
|
|
||||||
return closure.Return(nil), fmt.Errorf("Invalid opcode %x", op)
|
return closure.Return(nil), fmt.Errorf("Invalid opcode %x", op)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user