diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-01-02 18:58:59 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | 7afb275d8bbbc37ed39246f56a40691c8b882830 (patch) | |
tree | b3cd21bf9bb4462116a1adefc9efae492478190e /vendor | |
parent | d227987bb07f2f731629809daf3d6687f9cdaae4 (diff) | |
download | dexon-7afb275d8bbbc37ed39246f56a40691c8b882830.tar.gz dexon-7afb275d8bbbc37ed39246f56a40691c8b882830.tar.zst dexon-7afb275d8bbbc37ed39246f56a40691c8b882830.zip |
vendor: sync to latest core (#121)
Diffstat (limited to 'vendor')
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go | 15 | ||||
-rw-r--r-- | vendor/vendor.json | 42 |
2 files changed, 30 insertions, 27 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go index 3353d1d60..faadbe9bd 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/consensus.go @@ -563,14 +563,17 @@ func (con *Consensus) prepare(initBlock *types.Block) error { if err != nil { return err } - // TODO(jimmy): registerDKG should be called after dmoment. if _, exist := dkgSet[con.ID]; exist { con.logger.Info("Selected as DKG set", "round", initRound) - con.cfgModule.registerDKG(initRound, getDKGThreshold(initConfig)) - con.event.RegisterTime(con.dMoment.Add(initConfig.RoundInterval/4), - func(time.Time) { - con.runDKG(initRound, initConfig) - }) + go func() { + // Sleep until dMoment come. + time.Sleep(con.dMoment.Sub(time.Now().UTC())) + con.cfgModule.registerDKG(initRound, getDKGThreshold(initConfig)) + con.event.RegisterTime(con.dMoment.Add(initConfig.RoundInterval/4), + func(time.Time) { + con.runDKG(initRound, initConfig) + }) + }() } con.initialRound(con.dMoment, initRound, initConfig) return nil diff --git a/vendor/vendor.json b/vendor/vendor.json index 05cf85383..ec9c59f37 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -141,14 +141,14 @@ { "checksumSHA1": "65L1yf+f0OCiLFniljqfRxVdsQA=", "path": "github.com/dexon-foundation/dexon-consensus/common", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { - "checksumSHA1": "RjaTD2+CX1JhLuT6Ud7O3U2SmOA=", + "checksumSHA1": "Lr1fcYwV5dysAfISBDx7aQfZUCE=", "path": "github.com/dexon-foundation/dexon-consensus/core", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "v4fKR7uhoyufi6hAVO44cFEb+tY=", @@ -159,50 +159,50 @@ { "checksumSHA1": "tQSbYCu5P00lUhKsx3IbBZCuSLY=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "W2P7pkuJ+26BpJg03K4Y0nB5obI=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto/dkg", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "6Pf6caC8LTNCI7IflFmglKYnxYo=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "PJXR1OuWwVVYrdJMK3skPr1/8ls=", "path": "github.com/dexon-foundation/dexon-consensus/core/db", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "tFFonPHlve/3JqqRSopnLb6Rn2o=", "path": "github.com/dexon-foundation/dexon-consensus/core/syncer", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "tY+yi5kYk1u/scq+6e1KzhPv4kU=", "path": "github.com/dexon-foundation/dexon-consensus/core/types", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "sY+2eiOoWvsNMvuPl9qQ+rlT9sA=", "path": "github.com/dexon-foundation/dexon-consensus/core/types/dkg", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "0JFlVFny0IyANnlelQDl8ot16wU=", "path": "github.com/dexon-foundation/dexon-consensus/core/utils", - "revision": "f12b6cf891181a72914b3aec8caf7ae0879f6000", - "revisionTime": "2018-12-28T09:51:01Z" + "revision": "3c3e5d0b11758e2385b3890013be3e3698b992a8", + "revisionTime": "2019-01-02T10:56:02Z" }, { "checksumSHA1": "TAkwduKZqLyimyTPPWIllZWYFuE=", |