diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-10-29 09:31:36 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-12 17:27:17 +0800 |
commit | a69fb3e4c59fab52b6e10993c67400084879b1a8 (patch) | |
tree | 8e849faadee1e1c43068a4b0392a02050d271e3e /vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go | |
parent | 3f320c9048198d14bc44413861efcbc5665324b1 (diff) | |
download | go-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.tar.gz go-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.tar.zst go-tangerine-a69fb3e4c59fab52b6e10993c67400084879b1a8.zip |
vendor: sync consensus core and fix conflict
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go index 559eac0b7..bf24c31dc 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus-core/core/configuration-chain.go @@ -205,6 +205,12 @@ func (cc *configurationChain) touchTSigHash(hash common.Hash) (first bool) { return !exist } +func (cc *configurationChain) untouchTSigHash(hash common.Hash) { + cc.tsigReady.L.Lock() + defer cc.tsigReady.L.Unlock() + delete(cc.tsigTouched, hash) +} + func (cc *configurationChain) runTSig( round uint64, hash common.Hash) ( crypto.Signature, error) { @@ -240,10 +246,10 @@ func (cc *configurationChain) runTSig( signature, err = cc.tsig[hash].signature() return err == ErrNotEnoughtPartialSignatures }() { + // TODO(jimmy-dexon): add a timeout here. cc.tsigReady.Wait() } delete(cc.tsig, hash) - delete(cc.tsigTouched, hash) if err != nil { return crypto.Signature{}, err } |