diff options
author | bojie <bojie@dexon.org> | 2019-03-18 18:03:27 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-18 18:03:27 +0800 |
commit | 8218cb1525872cc0c7f09335305bcbed484153ad (patch) | |
tree | 94964ca976e014d49e8b2d498e248a374ffa9192 /core/configuration-chain_test.go | |
parent | 9e97ddc00c67ee13ceb8fc597f4f55cfd6df6101 (diff) | |
download | dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.gz dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.bz2 dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.lz dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.xz dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.tar.zst dexon-consensus-8218cb1525872cc0c7f09335305bcbed484153ad.zip |
core: snapshot DKG protocol struct when finish any phase (#496)
Diffstat (limited to 'core/configuration-chain_test.go')
-rw-r--r-- | core/configuration-chain_test.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/configuration-chain_test.go b/core/configuration-chain_test.go index 2edcade..3d8d1aa 100644 --- a/core/configuration-chain_test.go +++ b/core/configuration-chain_test.go @@ -583,6 +583,19 @@ func (s *ConfigurationChainTestSuite) TestDKGSignerRecoverFromDB() { } } +func (s *ConfigurationChainTestSuite) TestDKGPhasesSnapShot() { + k := 2 + n := 7 + round := DKGDelayRound + cfgChains := s.runDKG(k, n, round, 0) + + for _, cfgChain := range cfgChains { + info, err := cfgChain.db.GetDKGProtocol() + s.Require().NoError(err) + s.Require().Equal(uint64(7), info.Step) + } +} + func TestConfigurationChain(t *testing.T) { suite.Run(t, new(ConfigurationChainTestSuite)) } |