aboutsummaryrefslogtreecommitdiffstats
path: root/eth/protocol_test.go
diff options
context:
space:
mode:
authorJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 20:29:40 +0800
committerJeffrey Wilcke <geffobscura@gmail.com>2015-07-10 23:37:41 +0800
commita32c51effda8682b292d04863aae7811f78abf7e (patch)
treed721822cc10c929d5a2def0865c366e085ef99be /eth/protocol_test.go
parent5a810758dbe75dce9537d464ac0e5b5385b0e78f (diff)
downloadgo-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.gz
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.bz2
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.lz
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.xz
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.tar.zst
go-tangerine-a32c51effda8682b292d04863aae7811f78abf7e.zip
cmd, core, eth, common: genesis preparation
Implemented the --genesis flag thru which we can set a custom genesis block, including the official Ethereum genesis block.
Diffstat (limited to 'eth/protocol_test.go')
-rw-r--r--eth/protocol_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/eth/protocol_test.go b/eth/protocol_test.go
index 686380b40..77941852f 100644
--- a/eth/protocol_test.go
+++ b/eth/protocol_test.go
@@ -178,10 +178,11 @@ type testPeer struct {
}
func newProtocolManagerForTesting(txAdded chan<- []*types.Transaction) *ProtocolManager {
+ db, _ := ethdb.NewMemDatabase()
+ core.WriteTestNetGenesisBlock(db, db, 0)
var (
em = new(event.TypeMux)
- db, _ = ethdb.NewMemDatabase()
- chain, _ = core.NewChainManager(core.GenesisBlock(0, db), db, db, db, core.FakePow{}, em)
+ chain, _ = core.NewChainManager(db, db, db, core.FakePow{}, em)
txpool = &fakeTxPool{added: txAdded}
pm = NewProtocolManager(0, em, txpool, core.FakePow{}, chain)
)