aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block_manager_test.go
blob: df3e56e5eb955eb6a7d4928ddc6706cee091bcc0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package ethchain

import (
    _ "fmt"
    "github.com/ethereum/eth-go/ethdb"
    "github.com/ethereum/eth-go/ethutil"
    "math/big"
    "testing"
)

func TestVm(t *testing.T) {
    InitFees()
    ethutil.ReadConfig("")

    db, _ := ethdb.NewMemDatabase()
    ethutil.Config.Db = db
    bm := NewBlockManager(nil)

    block := bm.bc.genesisBlock
    script := Compile([]string{
        "PUSH",
        "1",
        "PUSH",
        "2",
        "STOP",
    })
    ctrct := NewTransaction(ContractAddr, big.NewInt(200000000), script)
    bm.ApplyTransactions(block, []*Transaction{ctrct})
}