diff options
author | Sonic <sonic@cobinhood.com> | 2018-10-16 10:33:24 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | a7d394e8c08fe9ccadc06c287d680c0632f414d7 (patch) | |
tree | 057773ba092434ccdd48fdd2cb2f5a6cb17c5a0a /dex/peer_test.go | |
parent | 222699705e6fc1d6e3a645b8ad654ea71f99f506 (diff) | |
download | dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar.gz dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar.bz2 dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar.lz dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar.xz dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.tar.zst dexon-a7d394e8c08fe9ccadc06c287d680c0632f414d7.zip |
dex: gov: using dex-consensus-core NodeSetCache
Diffstat (limited to 'dex/peer_test.go')
-rw-r--r-- | dex/peer_test.go | 9 |
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) |