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 13:50:05 +0800 |
commit | 01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c (patch) | |
tree | 44bead198964ac9462de3c410a2947e33faff075 /dex/handler.go | |
parent | 64ed8e60eebe4dc9afdc3c9564ff8a9e67d71f65 (diff) | |
download | dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar.gz dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar.bz2 dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar.lz dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar.xz dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.tar.zst dexon-01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c.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]) } |