diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-11-16 17:26:50 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:53 +0800 |
commit | f1f0e7d0b962c802124b2ed9123d3e9bd9cd9644 (patch) | |
tree | 29064c95d8e2639f277098e9a20a75f00e86ae68 /dex | |
parent | dfd3d209ddb5c48ced410eb543ee9b17cffc575e (diff) | |
download | dexon-f1f0e7d0b962c802124b2ed9123d3e9bd9cd9644.tar.gz dexon-f1f0e7d0b962c802124b2ed9123d3e9bd9cd9644.tar.zst dexon-f1f0e7d0b962c802124b2ed9123d3e9bd9cd9644.zip |
core: fix light node synchronization issue (#30)
InsertChain() need to record the correct roundHeight mapping in order to
process snapshotRoundHeight() governance method correctly.
Diffstat (limited to 'dex')
-rw-r--r-- | dex/backend.go | 1 | ||||
-rw-r--r-- | dex/handler.go | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/dex/backend.go b/dex/backend.go index 740b8cd6f..07646fd76 100644 --- a/dex/backend.go +++ b/dex/backend.go @@ -131,6 +131,7 @@ func New(ctx *node.ServiceContext, config *Config) (*Dexon, error) { EnablePreimageRecording: config.EnablePreimageRecording, EWASMInterpreter: config.EWASMInterpreter, EVMInterpreter: config.EVMInterpreter, + IsBlockProposer: config.BlockProposerEnabled, } cacheConfig = &core.CacheConfig{Disabled: config.NoPruning, TrieCleanLimit: config.TrieCleanCache, TrieDirtyLimit: config.TrieDirtyCache, TrieTimeLimit: config.TrieTimeout} ) diff --git a/dex/handler.go b/dex/handler.go index 7bc9c297d..21322e4e0 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -1079,6 +1079,10 @@ func (pm *ProtocolManager) peerSetLoop() { pm.BroadcastBlock(event.Block, true) // First propagate block to peers pm.BroadcastBlock(event.Block, false) // Only then announce to the rest + if !pm.isBlockProposer { + break + } + newRound := pm.gov.LenCRS() - 1 log.Trace("new round", "round", newRound) if newRound == round { |