aboutsummaryrefslogtreecommitdiffstats
path: root/eth/helper_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-08-31 23:09:50 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-10-04 07:13:56 +0800
commit7c7692933c21b77328a94eed714f66c276776197 (patch)
treef7a394c1823dd4da1ed2b37709c1c8f52c51b6ef /eth/helper_test.go
parent361082ec4b942aea7c01fcb1be1782cb68b6fe3a (diff)
downloadgo-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.gz
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.bz2
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.lz
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.xz
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.tar.zst
go-tangerine-7c7692933c21b77328a94eed714f66c276776197.zip
cmd/geth, cmd/utils, core, rpc: renamed to blockchain
* Renamed ChainManager to BlockChain * Checkpointing is no longer required and never really properly worked when the state was corrupted.
Diffstat (limited to 'eth/helper_test.go')
-rw-r--r--eth/helper_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/eth/helper_test.go b/eth/helper_test.go
index 034751f7f..e42fa1f82 100644
--- a/eth/helper_test.go
+++ b/eth/helper_test.go
@@ -30,18 +30,18 @@ var (
// channels for different events.
func newTestProtocolManager(blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) *ProtocolManager {
var (
- evmux = new(event.TypeMux)
- pow = new(core.FakePow)
- db, _ = ethdb.NewMemDatabase()
- genesis = core.WriteGenesisBlockForTesting(db, core.GenesisAccount{testBankAddress, testBankFunds})
- chainman, _ = core.NewChainManager(db, pow, evmux)
- blockproc = core.NewBlockProcessor(db, pow, chainman, evmux)
+ evmux = new(event.TypeMux)
+ pow = new(core.FakePow)
+ db, _ = ethdb.NewMemDatabase()
+ genesis = core.WriteGenesisBlockForTesting(db, core.GenesisAccount{testBankAddress, testBankFunds})
+ blockchain, _ = core.NewBlockChain(db, pow, evmux)
+ blockproc = core.NewBlockProcessor(db, pow, blockchain, evmux)
)
- chainman.SetProcessor(blockproc)
- if _, err := chainman.InsertChain(core.GenerateChain(genesis, db, blocks, generator)); err != nil {
+ blockchain.SetProcessor(blockproc)
+ if _, err := blockchain.InsertChain(core.GenerateChain(genesis, db, blocks, generator)); err != nil {
panic(err)
}
- pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, chainman, db)
+ pm := NewProtocolManager(NetworkId, evmux, &testTxPool{added: newtx}, pow, blockchain, db)
pm.Start()
return pm
}
@@ -116,7 +116,7 @@ func newTestPeer(name string, version int, pm *ProtocolManager, shake bool) (*te
}
// Execute any implicitly requested handshakes and return
if shake {
- td, head, genesis := pm.chainman.Status()
+ td, head, genesis := pm.blockchain.Status()
tp.handshake(nil, td, head, genesis)
}
return tp, errc