diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-29 14:02:28 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:57 +0800 |
commit | e5327ae2da93eb3c4784971157db4300d17fb35b (patch) | |
tree | 0071089bbd8722cdf0f5954c3a7441ce52931747 | |
parent | 1bfd7ff37aa4c3d135cf2eef52e89b8d4b76daf0 (diff) | |
download | dexon-e5327ae2da93eb3c4784971157db4300d17fb35b.tar.gz dexon-e5327ae2da93eb3c4784971157db4300d17fb35b.tar.zst dexon-e5327ae2da93eb3c4784971157db4300d17fb35b.zip |
vendor, param: sync to latest core and update dmoment (#182)
* vendor: sync to latest core
* params: update dmoment
-rw-r--r-- | params/config.go | 2 | ||||
-rw-r--r-- | vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go | 10 | ||||
-rw-r--r-- | vendor/vendor.json | 42 |
3 files changed, 29 insertions, 25 deletions
diff --git a/params/config.go b/params/config.go index 139a87840..c916ee801 100644 --- a/params/config.go +++ b/params/config.go @@ -83,7 +83,7 @@ var ( // TestnetChainConfig contains the chain parameters to run a node on the Taiwan test network. TestnetChainConfig = &ChainConfig{ ChainID: big.NewInt(238), - DMoment: 1548570900, + DMoment: 1548661200, HomesteadBlock: big.NewInt(0), DAOForkBlock: nil, DAOForkSupport: true, diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go index c08518ad8..c2ac711eb 100644 --- a/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go +++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/agreement.go @@ -172,7 +172,7 @@ func (a *agreement) restart( defer a.data.blocksLock.Unlock() a.data.votes = make(map[uint64][]map[types.NodeID]*types.Vote) a.data.votes[1] = newVoteListMap() - a.data.period = 1 + a.data.period = 2 a.data.blocks = make(map[types.NodeID]*types.Block) a.data.requiredVote = len(notarySet)/3*2 + 1 a.data.leader.restart(crs) @@ -266,7 +266,11 @@ func isStop(aID types.Position) bool { func (a *agreement) clocks() int { a.data.lock.RLock() defer a.data.lock.RUnlock() - scale := int(a.data.period) + scale := int(a.data.period) - 1 + if scale < 1 { + // just in case. + scale = 1 + } // 10 is a magic number derived from many years of experience. if scale > 10 { scale = 10 @@ -420,7 +424,7 @@ func (a *agreement) processVote(vote *types.Vote) error { a.data.recv.ProposeVote( types.NewVote(types.VoteFastCom, hash, vote.Period)) a.data.lockValue = hash - a.data.lockIter = math.MaxUint64 + a.data.lockIter = 1 a.hasVoteFast = true } } else { diff --git a/vendor/vendor.json b/vendor/vendor.json index 07b7b3966..91a894ccd 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -141,16 +141,16 @@ { "checksumSHA1": "MA1hygDGoOGggSd39fadmgoK0u0=", "path": "github.com/dexon-foundation/dexon-consensus/common", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { - "checksumSHA1": "bg2pqKv1bqixgkB22xnY5BpTO6U=", + "checksumSHA1": "2HlJzgv2ke8g5faXzvaya55ndMU=", "path": "github.com/dexon-foundation/dexon-consensus/core", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, @@ -165,64 +165,64 @@ { "checksumSHA1": "tQSbYCu5P00lUhKsx3IbBZCuSLY=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "Nlv7pi1DIBftY+r6CFP8LBIQA3U=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto/dkg", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "BhLKK8RveoLaeXc9UyUKMwQqchU=", "path": "github.com/dexon-foundation/dexon-consensus/core/crypto/ecdsa", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "zpuCdMT8MGsy4pLgHKpg/Wd4izU=", "path": "github.com/dexon-foundation/dexon-consensus/core/db", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "eq19vhMpc90UUJ7I91ti5P2CkQ0=", "path": "github.com/dexon-foundation/dexon-consensus/core/syncer", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "OOyjMSUDuT8n/IJLFpDxENpgf/A=", "path": "github.com/dexon-foundation/dexon-consensus/core/types", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "rmv8uxwrqMhJAeA3RPvwYP8mFro=", "path": "github.com/dexon-foundation/dexon-consensus/core/types/dkg", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, { "checksumSHA1": "ZRpjtBZT6CEIqysdaONmteBCy4A=", "path": "github.com/dexon-foundation/dexon-consensus/core/utils", - "revision": "29eeeb08cac1b203dca2075d2901779d12be85b7", - "revisionTime": "2019-01-27T06:25:42Z", + "revision": "6907a35141f4ab9c5c0d8fc2cb31eaaf60f0c867", + "revisionTime": "2019-01-28T07:23:54Z", "version": "master", "versionExact": "master" }, |