Official Go implementation of the Ethereum protocol
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-ethereum/ethchain/block_manager_test.go

30 lines
517 B

11 years ago
package ethchain
import (
_ "fmt"
"github.com/ethereum/eth-go/ethdb"
"github.com/ethereum/eth-go/ethutil"
"math/big"
11 years ago
"testing"
)
func TestVm(t *testing.T) {
InitFees()
ethutil.ReadConfig("")
11 years ago
db, _ := ethdb.NewMemDatabase()
ethutil.Config.Db = db
bm := NewBlockManager(nil)
11 years ago
block := bm.bc.genesisBlock
11 years ago
script := Compile([]string{
"PUSH",
"1",
"PUSH",
"2",
11 years ago
"STOP",
})
11 years ago
ctrct := NewTransaction(ContractAddr, big.NewInt(200000000), script)
bm.ApplyTransactions(block, []*Transaction{ctrct})
11 years ago
}