aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block_manager_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-02-15 06:56:09 +0800
committerobscuren <geffobscura@gmail.com>2014-02-15 06:56:09 +0800
commitf6d1bfe45bf3709d7bad40bf563b5c09228622e3 (patch)
treedf48311a5a494c66c74dcd51f1056cc699f01507 /ethchain/block_manager_test.go
parentc2fb9f06ad018d01ce335c82b3542de16045a32d (diff)
downloaddexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.gz
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.bz2
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.lz
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.xz
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.tar.zst
dexon-f6d1bfe45bf3709d7bad40bf563b5c09228622e3.zip
The great merge
Diffstat (limited to 'ethchain/block_manager_test.go')
-rw-r--r--ethchain/block_manager_test.go75
1 files changed, 75 insertions, 0 deletions
diff --git a/ethchain/block_manager_test.go b/ethchain/block_manager_test.go
new file mode 100644
index 000000000..502c50b97
--- /dev/null
+++ b/ethchain/block_manager_test.go
@@ -0,0 +1,75 @@
+package ethchain
+
+/*
+import (
+ _ "fmt"
+ "testing"
+)
+
+func TestVm(t *testing.T) {
+ InitFees()
+
+ db, _ := NewMemDatabase()
+ Db = db
+
+ ctrct := NewTransaction("", 200000000, []string{
+ "PUSH", "1a2f2e",
+ "PUSH", "hallo",
+ "POP", // POP hallo
+ "PUSH", "3",
+ "LOAD", // Load hallo back on the stack
+
+ "PUSH", "1",
+ "PUSH", "2",
+ "ADD",
+
+ "PUSH", "2",
+ "PUSH", "1",
+ "SUB",
+
+ "PUSH", "100000000000000000000000",
+ "PUSH", "10000000000000",
+ "SDIV",
+
+ "PUSH", "105",
+ "PUSH", "200",
+ "MOD",
+
+ "PUSH", "100000000000000000000000",
+ "PUSH", "10000000000000",
+ "SMOD",
+
+ "PUSH", "5",
+ "PUSH", "10",
+ "LT",
+
+ "PUSH", "5",
+ "PUSH", "5",
+ "LE",
+
+ "PUSH", "50",
+ "PUSH", "5",
+ "GT",
+
+ "PUSH", "5",
+ "PUSH", "5",
+ "GE",
+
+ "PUSH", "10",
+ "PUSH", "10",
+ "NOT",
+
+ "MYADDRESS",
+ "TXSENDER",
+
+ "STOP",
+ })
+ tx := NewTransaction("1e8a42ea8cce13", 100, []string{})
+
+ block := CreateBlock("", 0, "", "c014ba53", 0, 0, "", []*Transaction{ctrct, tx})
+ db.Put(block.Hash(), block.RlpEncode())
+
+ bm := NewBlockManager()
+ bm.ProcessBlock(block)
+}
+*/