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 /core/headerchain.go | |
parent | f30474a07847c4406601bf045250ac18630dc484 (diff) | |
download | dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.gz dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.bz2 dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.lz dexon-a2436b50ae570eb92afd836ca93005b60f6e0e21.tar.xz 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 'core/headerchain.go')
-rw-r--r-- | core/headerchain.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/headerchain.go b/core/headerchain.go index 0c2000064..b6aa66b60 100644 --- a/core/headerchain.go +++ b/core/headerchain.go @@ -535,15 +535,15 @@ func (hc *HeaderChain) verifyDexonHeader(header *types.Header, } } - if header.Time != uint64(coreBlock.Finalization.Timestamp.UnixNano()/1000000) { + if header.Time != uint64(coreBlock.Timestamp.UnixNano()/1000000) { return fmt.Errorf("timestamp mismatch") } - if header.Number.Uint64() != coreBlock.Finalization.Height { + if header.Number.Uint64() != coreBlock.Position.Height { return fmt.Errorf("height mismatch") } - if !reflect.DeepEqual(header.Randomness, coreBlock.Finalization.Randomness) { + if !reflect.DeepEqual(header.Randomness, coreBlock.Randomness) { return fmt.Errorf("randomness mismatch") } @@ -562,7 +562,7 @@ func (hc *HeaderChain) verifyTSig(coreBlock *coreTypes.Block, verifierCache *dexCore.TSigVerifierCache) error { round := coreBlock.Position.Round - randomness := coreBlock.Finalization.Randomness + randomness := coreBlock.Randomness if round == 0 { return nil |