aboutsummaryrefslogtreecommitdiffstats
path: root/dex/helper_test.go
diff options
context:
space:
mode:
authorJhih-Ming Huang <jm@byzantine-lab.io>2019-08-16 16:28:50 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-09-17 16:57:31 +0800
commit0594f51ee194bc975a75d293a789d98f47f3f4d9 (patch)
tree552839016bb000cb8000efd91356304ee993b7a5 /dex/helper_test.go
parent3430fc0db2e1b0fdba84b97924d0151e446805c9 (diff)
downloadgo-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar.gz
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar.bz2
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar.lz
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar.xz
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.tar.zst
go-tangerine-0594f51ee194bc975a75d293a789d98f47f3f4d9.zip
core: add p2p whitelist for consortium
Diffstat (limited to 'dex/helper_test.go')
-rw-r--r--dex/helper_test.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/dex/helper_test.go b/dex/helper_test.go
index 6e2cd3d77..5e171fef0 100644
--- a/dex/helper_test.go
+++ b/dex/helper_test.go
@@ -110,13 +110,18 @@ func (a *testApp) SubscribeNewFinalizedBlockEvent(
// newTestProtocolManager creates a new protocol manager for testing purposes,
// with the given number of blocks already known, and potential notification
// channels for different events.
-func newTestProtocolManager(mode downloader.SyncMode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) (*ProtocolManager, *ethdb.MemDatabase, error) {
+func newTestProtocolManager(mode downloader.SyncMode,
+ blocks int,
+ generator func(int, *core.BlockGen),
+ newtx chan<- []*types.Transaction,
+ chainConfig *params.ChainConfig,
+) (*ProtocolManager, *ethdb.MemDatabase, error) {
var (
evmux = new(event.TypeMux)
engine = ethash.NewFaker()
db = ethdb.NewMemDatabase()
gspec = &core.Genesis{
- Config: params.TestChainConfig,
+ Config: chainConfig,
Alloc: core.GenesisAlloc{testBank: {Balance: big.NewInt(1000000), Staked: big.NewInt(0)}},
}
genesis = gspec.MustCommit(db)
@@ -150,7 +155,7 @@ func newTestProtocolManager(mode downloader.SyncMode, blocks int, generator func
// channels for different events. In case of an error, the constructor force-
// fails the test.
func newTestProtocolManagerMust(t *testing.T, mode downloader.SyncMode, blocks int, generator func(int, *core.BlockGen), newtx chan<- []*types.Transaction) (*ProtocolManager, *ethdb.MemDatabase) {
- pm, db, err := newTestProtocolManager(mode, blocks, generator, newtx)
+ pm, db, err := newTestProtocolManager(mode, blocks, generator, newtx, params.TestChainConfig)
if err != nil {
t.Fatalf("Failed to create protocol manager: %v", err)
}