diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-01-29 14:02:28 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-12 12:19:09 +0800 |
commit | c441f75b52279fd1dd86bddf7fce3c454b6e2b7f (patch) | |
tree | 644162a059e464cc3e80e2f7c567f74ccbac96fb | |
parent | bb92964ba3a28f595bb608d7bb4b5ed116a25360 (diff) | |
download | dexon-c441f75b52279fd1dd86bddf7fce3c454b6e2b7f.tar.gz dexon-c441f75b52279fd1dd86bddf7fce3c454b6e2b7f.tar.zst dexon-c441f75b52279fd1dd86bddf7fce3c454b6e2b7f.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 bfb600298..5843def3d 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" }, |