diff options
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go index fbd504d24..4a99d3dcc 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/configuration-chain.go @@ -662,7 +662,7 @@ func (cc *configurationChain) untouchTSigHash(hash common.Hash) { } func (cc *configurationChain) runTSig( - round uint64, hash common.Hash) ( + round uint64, hash common.Hash, wait time.Duration) ( crypto.Signature, error) { npks, _, _ := cc.getDKGInfo(round, false) if npks == nil { @@ -687,8 +687,7 @@ func (cc *configurationChain) runTSig( }() timeout := make(chan struct{}, 1) go func() { - // TODO(jimmy-dexon): make timeout configurable. - time.Sleep(5 * time.Second) + time.Sleep(wait) timeout <- struct{}{} cc.tsigReady.Broadcast() }() @@ -714,7 +713,7 @@ func (cc *configurationChain) runTSig( func (cc *configurationChain) runCRSTSig( round uint64, crs common.Hash) ([]byte, error) { - sig, err := cc.runTSig(round, crs) + sig, err := cc.runTSig(round, crs, cc.gov.Configuration(round).LambdaDKG*5) cc.logger.Info("CRS", "nodeID", cc.ID, "round", round+1, |