diff options
author | obscuren <geffobscura@gmail.com> | 2014-05-17 20:07:52 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-05-17 20:07:52 +0800 |
commit | 8730dfdcc2e2b40410a57385e4864d15f2f0336b (patch) | |
tree | eabf6400bc78b1796317fbb7cef642a7f2da2306 /ethchain/block_chain_test.go | |
parent | 88686cbed27ad2e7d5c111051e06c270b1b352a3 (diff) | |
download | go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar.gz go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar.bz2 go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar.lz go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar.xz go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.tar.zst go-tangerine-8730dfdcc2e2b40410a57385e4864d15f2f0336b.zip |
Changed how changes are being applied to states
Diffstat (limited to 'ethchain/block_chain_test.go')
-rw-r--r-- | ethchain/block_chain_test.go | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ethchain/block_chain_test.go b/ethchain/block_chain_test.go index 30eb62266..4e4bb9dd4 100644 --- a/ethchain/block_chain_test.go +++ b/ethchain/block_chain_test.go @@ -18,6 +18,18 @@ type TestManager struct { Blocks []*Block } +func (s *TestManager) IsListening() bool { + return false +} + +func (s *TestManager) IsMining() bool { + return false +} + +func (s *TestManager) PeerCount() int { + return 0 +} + func (s *TestManager) BlockChain() *BlockChain { return s.blockChain } @@ -38,7 +50,7 @@ func (tm *TestManager) Broadcast(msgType ethwire.MsgType, data []interface{}) { } func NewTestManager() *TestManager { - ethutil.ReadConfig(".ethtest") + ethutil.ReadConfig(".ethtest", ethutil.LogStd) db, err := ethdb.NewMemDatabase() if err != nil { @@ -62,8 +74,7 @@ func NewTestManager() *TestManager { func (tm *TestManager) AddFakeBlock(blk []byte) error { block := NewBlockFromBytes(blk) tm.Blocks = append(tm.Blocks, block) - tm.StateManager().PrepareDefault(block) - err := tm.StateManager().ProcessBlock(block, false) + err := tm.StateManager().ProcessBlock(tm.StateManager().CurrentState(), block, false) return err } func (tm *TestManager) CreateChain1() error { |