diff options
author | Sonic <sonic@cobinhood.com> | 2018-10-14 22:39:11 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 13:49:53 +0800 |
commit | 2e6d95317f24212550352f9726cc18dbb390fb63 (patch) | |
tree | 917e7457681a696ef328acff247aaffe0d557a86 /dex/peer_test.go | |
parent | cada6546668db5b0f02d55bfb4a9d232b8185cf5 (diff) | |
download | dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar.gz dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar.bz2 dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar.lz dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar.xz dexon-2e6d95317f24212550352f9726cc18dbb390fb63.tar.zst dexon-2e6d95317f24212550352f9726cc18dbb390fb63.zip |
dex: add method to get NumChains, NotarySet, DKGSet easily
Diffstat (limited to 'dex/peer_test.go')
-rw-r--r-- | dex/peer_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dex/peer_test.go b/dex/peer_test.go index 6e539e078..d0262e201 100644 --- a/dex/peer_test.go +++ b/dex/peer_test.go @@ -16,7 +16,7 @@ func TestPeerSetBuildAndForgetNotaryConn(t *testing.T) { table := newNodeTable() gov := &testGovernance{ - getChainNumFunc: func(uint64) uint32 { + numChainsFunc: func(uint64) uint32 { return 3 }, } @@ -37,7 +37,7 @@ func TestPeerSetBuildAndForgetNotaryConn(t *testing.T) { []enode.ID{nodeID(0), nodeID(2), nodeID(6)}, } - gov.getNotarySetFunc = func(cid uint32, round uint64) map[string]struct{} { + gov.notarySetFunc = func(cid uint32, round uint64) map[string]struct{} { m := map[uint64][][]enode.ID{ 10: round10, 11: round11, @@ -317,7 +317,7 @@ func TestPeerSetBuildDKGConn(t *testing.T) { gov := &testGovernance{} - gov.getDKGSetFunc = func(round uint64) map[string]struct{} { + gov.dkgSetFunc = func(round uint64) map[string]struct{} { m := map[uint64][]enode.ID{ 10: []enode.ID{nodeID(0), nodeID(1), nodeID(2)}, 11: []enode.ID{nodeID(1), nodeID(2), nodeID(5)}, |