aboutsummaryrefslogtreecommitdiffstats
path: root/core/headerchain.go
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 13:50:05 +0800
commit01cb9a0211a1197aaf9ef8b9f82a1ebd935fd04c (patch)
tree44bead198964ac9462de3c410a2947e33faff075 /core/headerchain.go
parent64ed8e60eebe4dc9afdc3c9564ff8a9e67d71f65 (diff)
downloaddexon-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 'core/headerchain.go')
-rw-r--r--core/headerchain.go8
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