aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/vm_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-07-01 02:03:31 +0800
committerobscuren <geffobscura@gmail.com>2014-07-01 02:03:31 +0800
commited276cd7c241749a9cf8add4e2fae3d3608a7ea4 (patch)
tree40416177aeac9874e0eecdb7194db9bc13e39174 /ethchain/vm_test.go
parent82272ee08a7d72be1cc0947b6a0e8096a0353362 (diff)
downloaddexon-ed276cd7c241749a9cf8add4e2fae3d3608a7ea4.tar.gz
dexon-ed276cd7c241749a9cf8add4e2fae3d3608a7ea4.tar.zst
dexon-ed276cd7c241749a9cf8add4e2fae3d3608a7ea4.zip
Added Paranoia check for VM execution
Diffstat (limited to 'ethchain/vm_test.go')
-rw-r--r--ethchain/vm_test.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/ethchain/vm_test.go b/ethchain/vm_test.go
index c569d89ae..c8023cd79 100644
--- a/ethchain/vm_test.go
+++ b/ethchain/vm_test.go
@@ -5,9 +5,7 @@ import (
"fmt"
"github.com/ethereum/eth-go/ethdb"
"github.com/ethereum/eth-go/ethutil"
- "github.com/obscuren/mutan"
"math/big"
- "strings"
"testing"
)
@@ -17,7 +15,7 @@ func TestRun4(t *testing.T) {
db, _ := ethdb.NewMemDatabase()
state := NewState(ethutil.NewTrie(db, ""))
- callerScript, err := mutan.Compile(strings.NewReader(`
+ callerScript, err := ethutil.Compile(`
this.store[this.origin()] = 10**20
hello := "world"
@@ -31,7 +29,7 @@ func TestRun4(t *testing.T) {
this.store[to] = this.store[to] + value
}
}
- `), false)
+ `)
if err != nil {
fmt.Println(err)
}
@@ -55,7 +53,7 @@ func TestRun4(t *testing.T) {
vm := NewVm(state, nil, RuntimeVars{
Origin: account.Address(),
- BlockNumber: 1,
+ BlockNumber: big.NewInt(1),
PrevHash: ethutil.FromHex("5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6"),
Coinbase: ethutil.FromHex("2adc25665018aa1fe0e6bc666dac8fc2697ff9ba"),
Time: 1,