aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-16 17:35:26 +0800
committerobscuren <geffobscura@gmail.com>2014-09-16 17:35:26 +0800
commitd02024929a3e617c16c5b33e1d245f23fa4f6c7b (patch)
treea2058d6343766fcec60fb77a1425bc8b0905735b
parent399256b38403f2e95312250d49fca3cada8956b8 (diff)
downloaddexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar.gz
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar.bz2
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar.lz
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar.xz
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.tar.zst
dexon-d02024929a3e617c16c5b33e1d245f23fa4f6c7b.zip
require 5 for post
-rw-r--r--ethereum.go3
-rw-r--r--ethvm/vm.go11
2 files changed, 8 insertions, 6 deletions
diff --git a/ethereum.go b/ethereum.go
index 8d62fa9f2..fdfb59b09 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -23,8 +23,7 @@ import (
const (
seedTextFileUri string = "http://www.ethereum.org/servers.poc3.txt"
- //seedNodeAddress = "54.76.56.74:30303"
- seedNodeAddress = "localhost:30303"
+ seedNodeAddress = "54.76.56.74:30303"
)
var ethlogger = ethlog.NewLogger("SERV")
diff --git a/ethvm/vm.go b/ethvm/vm.go
index cfba3820b..2a4fddbc5 100644
--- a/ethvm/vm.go
+++ b/ethvm/vm.go
@@ -63,7 +63,7 @@ func New(env Environment) *Vm {
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 {
@@ -200,7 +200,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-2])
case CALLDATACOPY:
- require(3)
+ require(2)
newMemSize = calcMemSize(stack.Peek(), stack.data[stack.Len()-3])
case CODECOPY:
@@ -210,7 +210,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
case EXTCODECOPY:
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:
require(7)
gas.Set(GasCall)
@@ -832,7 +832,7 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
}
case POST:
- require(6)
+ require(5)
self.Endl()
@@ -872,6 +872,9 @@ func (self *Vm) RunClosure(closure *Closure) (ret []byte, err error) {
default:
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)
}