aboutsummaryrefslogtreecommitdiffstats
path: root/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-02 03:18:09 +0800
committerobscuren <geffobscura@gmail.com>2014-12-02 03:18:09 +0800
commit6dc46d3341dc5fa25bd005f9606de258874139be (patch)
tree39b5d7dad5a943de4e187f99c93da5aa7fc9f2b8 /vm
parenta3559c5e1b469890bb8d71e9992175febaae31c7 (diff)
downloaddexon-6dc46d3341dc5fa25bd005f9606de258874139be.tar.gz
dexon-6dc46d3341dc5fa25bd005f9606de258874139be.tar.zst
dexon-6dc46d3341dc5fa25bd005f9606de258874139be.zip
Changed the way transactions are being added to the transaction pool
Diffstat (limited to 'vm')
-rw-r--r--vm/vm_debug.go11
1 files changed, 10 insertions, 1 deletions
diff --git a/vm/vm_debug.go b/vm/vm_debug.go
index ae5a20175..18d3018a0 100644
--- a/vm/vm_debug.go
+++ b/vm/vm_debug.go
@@ -151,7 +151,7 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
// Stack checks only
case ISZERO, CALLDATALOAD, POP, JUMP, NOT: // 1
require(1)
- case ADD, SUB, DIV, SDIV, MOD, SMOD, EXP, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE: // 2
+ case ADD, SUB, DIV, SDIV, MOD, SMOD, LT, GT, SLT, SGT, EQ, AND, OR, XOR, BYTE: // 2
require(2)
case ADDMOD, MULMOD: // 3
require(3)
@@ -169,6 +169,15 @@ func (self *DebugVm) RunClosure(closure *Closure) (ret []byte, err error) {
gas.Set(GasLog)
addStepGasUsage(new(big.Int).Mul(big.NewInt(int64(n)), GasLog))
addStepGasUsage(new(big.Int).Add(mSize, mStart))
+ case EXP:
+ require(2)
+
+ expGas := ethutil.FirstBitSet(stack.data[stack.Len()-2])
+ expGas.Div(expGas, u256(8))
+ expGas.Sub(u256(32), expGas)
+ expGas.Add(expGas, u256(1))
+
+ gas.Set(expGas)
// Gas only
case STOP:
gas.Set(ethutil.Big0)