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@dexon.org>2019-04-09 21:32:59 +0800
commita2436b50ae570eb92afd836ca93005b60f6e0e21 (patch)
treee2d393eff22c7e32ea118d6f798ff14266664d28 /consensus
parentf30474a07847c4406601bf045250ac18630dc484 (diff)
downloaddexon-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 '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 {