aboutsummaryrefslogtreecommitdiffstats
path: root/dex/helper_test.go
diff options
context:
space:
mode:
authorSonic <sonic@cobinhood.com>2018-10-17 14:10:52 +0800
committerWei-Ning Huang <w@dexon.org>2019-03-12 12:19:09 +0800
commit71c6a58419e1b68b49b6c7d307acee305474d248 (patch)
tree6191bff0d72a669a259cb5221c1e832a507275df /dex/helper_test.go
parentb091251b901091e106f3b92be7f32a83ce5af6da (diff)
downloaddexon-71c6a58419e1b68b49b6c7d307acee305474d248.tar.gz
dexon-71c6a58419e1b68b49b6c7d307acee305474d248.tar.zst
dexon-71c6a58419e1b68b49b6c7d307acee305474d248.zip
dex: let notary nodes connect to some dkg nodes
BuildConnection builds notary and dkg connections together
Diffstat (limited to 'dex/helper_test.go')
-rw-r--r--dex/helper_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/dex/helper_test.go b/dex/helper_test.go
index 5b73c4afa..a077304b1 100644
--- a/dex/helper_test.go
+++ b/dex/helper_test.go
@@ -111,7 +111,14 @@ func newTestProtocolManager(mode downloader.SyncMode, blocks int, generator func
panic(err)
}
- pm, err := NewProtocolManager(gspec.Config, mode, DefaultConfig.NetworkId, evmux, &testTxPool{added: newtx}, engine, blockchain, db, &testGovernance{})
+ tgov := &testGovernance{
+ numChainsFunc: func(uint64) uint32 { return 3 },
+ lenCRSFunc: func() uint64 { return 1 },
+ dkgSetFunc: func(uint64) (map[string]struct{}, error) { return nil, nil },
+ notarySetFunc: func(uint64, uint32) (map[string]struct{}, error) { return nil, nil },
+ }
+
+ pm, err := NewProtocolManager(gspec.Config, mode, DefaultConfig.NetworkId, evmux, &testTxPool{added: newtx}, engine, blockchain, db, tgov)
if err != nil {
return nil, nil, err
}