aboutsummaryrefslogtreecommitdiffstats
path: root/consensus
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 /consensus
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 'consensus')
-rw-r--r--consensus/dexcon/fake_dexcon.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/consensus/dexcon/fake_dexcon.go b/consensus/dexcon/fake_dexcon.go
index ae7bed90e..430d9bc6b 100644
--- a/consensus/dexcon/fake_dexcon.go
+++ b/consensus/dexcon/fake_dexcon.go
@@ -3,7 +3,6 @@ package dexcon
import (
"crypto/ecdsa"
"math/big"
- "time"
coreCommon "github.com/dexon-foundation/dexon-consensus/common"
dexCore "github.com/dexon-foundation/dexon-consensus/core"
@@ -54,15 +53,8 @@ func (f *FakeDexcon) Prepare(chain consensus.ChainReader, header *types.Header)
}
}
- parentCoreBlockHash, err := coreUtils.HashBlock(&parentCoreBlock)
- if err != nil {
- return err
- }
randomness := f.nodes.Randomness(header.Round, common.Hash(blockHash))
- coreBlock.Finalization.ParentHash = parentCoreBlockHash
- coreBlock.Finalization.Randomness = randomness
- coreBlock.Finalization.Timestamp = time.Now().UTC()
- coreBlock.Finalization.Height = parentHeader.Number.Uint64()
+ coreBlock.Randomness = randomness
dexconMeta, err := rlp.EncodeToBytes(&coreBlock)
if err != nil {