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@byzantine-lab.io>2019-06-12 17:23:39 +0800
commite5137c6582c1ffb6943842aed88b3a31a31c34f1 (patch)
treeb0d24a70b69d429e7c4a95de1fb3852aafd7fb5a /dex/peer_test.go
parent16f356dcf34722510c59a1f946a5ffa138bd6da7 (diff)
downloadgo-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar.gz
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar.bz2
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar.lz
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar.xz
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.tar.zst
go-tangerine-e5137c6582c1ffb6943842aed88b3a31a31c34f1.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)