aboutsummaryrefslogtreecommitdiffstats
path: root/core/configuration-chain_test.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-20 14:57:12 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-03-27 15:25:10 +0800
commit6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7 (patch)
tree2c18fe616f84df7274f19f88cf325fe558869918 /core/configuration-chain_test.go
parentfa3b5a29499739e90b3cf17f9a0cf60a72a64fc0 (diff)
downloaddexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.gz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.bz2
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.lz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.xz
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.tar.zst
dexon-consensus-6efe199cb38eb4cb9a9a64d98ff5f8c4fb997da7.zip
core: merge notarySet and DKGSet (#488)
* core: さよなら DKGSet * test logger * temporary fix before finalized * core: Sign psig on commit vote * Add syncer log * fixup
Diffstat (limited to 'core/configuration-chain_test.go')
-rw-r--r--core/configuration-chain_test.go17
1 files changed, 14 insertions, 3 deletions
diff --git a/core/configuration-chain_test.go b/core/configuration-chain_test.go
index af7e36d..a4c6e2a 100644
--- a/core/configuration-chain_test.go
+++ b/core/configuration-chain_test.go
@@ -430,10 +430,17 @@ func (s *ConfigurationChainTestSuite) TestDKGComplaintDelayAdd() {
errs <- cc.runDKG(round, reset)
}(cc)
}
+ complaints := -1
go func() {
// Node 0 proposes NackComplaint to all others at 3λ but they should
- // be ignored because NackComplaint shoould be proposed before 2λ.
+ // be ignored because NackComplaint should be proposed before 2λ.
time.Sleep(lambdaDKG * 3)
+ for _, gov := range recv.govs {
+ if complaints == -1 {
+ complaints = len(gov.DKGComplaints(round))
+ }
+ s.Require().Len(gov.DKGComplaints(round), complaints)
+ }
nID := s.nIDs[0]
for _, targetNode := range s.nIDs {
if targetNode == nID {
@@ -449,15 +456,19 @@ func (s *ConfigurationChainTestSuite) TestDKGComplaintDelayAdd() {
}
}()
wg.Wait()
+ complaints += len(s.nIDs) - 1
+ for _, gov := range recv.govs {
+ s.Require().Len(gov.DKGComplaints(round), complaints)
+ }
for range cfgChains {
s.Require().NoError(<-errs)
}
for nID, cc := range cfgChains {
if _, exist := cc.npks[round]; !exist {
- s.FailNow("Should be qualifyied")
+ s.FailNow("Should be qualified")
}
if _, exist := cc.npks[round].QualifyNodeIDs[nID]; !exist {
- s.FailNow("Should be qualifyied")
+ s.FailNow("Should be qualified")
}
}
}