diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-04-01 18:01:26 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:59 +0800 |
commit | a2436b50ae570eb92afd836ca93005b60f6e0e21 (patch) | |
tree | e2d393eff22c7e32ea118d6f798ff14266664d28 /dex/handler.go | |
parent | f30474a07847c4406601bf045250ac18630dc484 (diff) | |
download | dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.gz dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.zst dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.zip |
vendor: sync to latest core (#320)
* vendor: sync to latest core
* dex, core: fix conflict
x
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/dex/handler.go b/dex/handler.go index 6395c4113..61e382610 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -1083,7 +1083,7 @@ func (pm *ProtocolManager) BroadcastRecords(records []*enr.Record) { // BroadcastFinalizedBlock broadcasts the finalized core block to some of its peers. func (pm *ProtocolManager) BroadcastFinalizedBlock(block *coreTypes.Block) { - if len(block.Finalization.Randomness) == 0 { + if len(block.Randomness) == 0 { log.Warn("Ignore broadcast finalized block without randomness", "block", block) return } @@ -1132,8 +1132,7 @@ func (pm *ProtocolManager) BroadcastAgreementResult( agreement *coreTypes.AgreementResult) { block := pm.cache.blocks(coreCommon.Hashes{agreement.BlockHash}) if len(block) != 0 { - block[0].Finalization.Height = agreement.FinalizationHeight - block[0].Finalization.Randomness = agreement.Randomness + block[0].Randomness = agreement.Randomness pm.cache.addFinalizedBlock(block[0]) } |