aboutsummaryrefslogtreecommitdiffstats
path: root/dex/handler.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-04-01 18:01:26 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-15 22:09:55 +0800
commitbde4a6cc02c6806093d2a49a86463f81358ca3d8 (patch)
treebc3d617f8ff755f6cca5c4fc1dff7b5457845c9f /dex/handler.go
parent3c0372165e723de9f1bd3ea8dacd579810463f6d (diff)
downloadgo-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar.gz
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar.bz2
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar.lz
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar.xz
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.tar.zst
go-tangerine-bde4a6cc02c6806093d2a49a86463f81358ca3d8.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.go5
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])
}