aboutsummaryrefslogtreecommitdiffstats
path: root/dex/peer_test.go
diff options
context:
space:
mode:
authorSonic <sonic@cobinhood.com>2018-10-16 10:33:24 +0800
committerWei-Ning Huang <w@dexon.org>2018-12-19 20:54:27 +0800
commit2c67107155875b528b15628658e31cb97b41f8db (patch)
treeaabfd791760d53f2099a7189884c367860cf3259 /dex/peer_test.go
parentfc412f8662b6ce02300541840c54bacdb4756ac1 (diff)
downloaddexon-2c67107155875b528b15628658e31cb97b41f8db.tar
dexon-2c67107155875b528b15628658e31cb97b41f8db.tar.gz
dexon-2c67107155875b528b15628658e31cb97b41f8db.tar.bz2
dexon-2c67107155875b528b15628658e31cb97b41f8db.tar.lz
dexon-2c67107155875b528b15628658e31cb97b41f8db.tar.xz
dexon-2c67107155875b528b15628658e31cb97b41f8db.tar.zst
dexon-2c67107155875b528b15628658e31cb97b41f8db.zip
dex: gov: using dex-consensus-core NodeSetCache
Diffstat (limited to 'dex/peer_test.go')
-rw-r--r--dex/peer_test.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/dex/peer_test.go b/dex/peer_test.go
index 74989258a..c38848b66 100644
--- a/dex/peer_test.go
+++ b/dex/peer_test.go
@@ -42,13 +42,14 @@ func TestPeerSetBuildAndForgetNotaryConn(t *testing.T) {
[]enode.ID{nodeID(0), nodeID(2), nodeID(6)},
}
- gov.notarySetFunc = func(cid uint32, round uint64) map[string]struct{} {
+ gov.notarySetFunc = func(
+ round uint64, cid uint32) (map[string]struct{}, error) {
m := map[uint64][][]enode.ID{
10: round10,
11: round11,
12: round12,
}
- return newTestNodeSet(m[round][cid])
+ return newTestNodeSet(m[round][cid]), nil
}
ps := newPeerSet(gov, server, table)
@@ -325,13 +326,13 @@ func TestPeerSetBuildDKGConn(t *testing.T) {
gov := &testGovernance{}
- gov.dkgSetFunc = func(round uint64) map[string]struct{} {
+ gov.dkgSetFunc = func(round uint64) (map[string]struct{}, error) {
m := map[uint64][]enode.ID{
10: []enode.ID{nodeID(0), nodeID(1), nodeID(2)},
11: []enode.ID{nodeID(1), nodeID(2), nodeID(5)},
12: []enode.ID{nodeID(0), nodeID(3), nodeID(5)},
}
- return newTestNodeSet(m[round])
+ return newTestNodeSet(m[round]), nil
}
ps := newPeerSet(gov, server, table)