diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-10-04 14:56:00 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-04 14:56:00 +0800 |
commit | 149e918f4fc78632483bf549dd8f5ffe55366e18 (patch) | |
tree | feabcb67103d76cc829ea81a1d57735e71db23d8 /core/compaction-chain.go | |
parent | 519cc8a734a510f44463b8dd175b7505f0308a22 (diff) | |
download | dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar.gz dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar.bz2 dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar.lz dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar.xz dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.tar.zst dexon-consensus-149e918f4fc78632483bf549dd8f5ffe55366e18.zip |
core: Check Witness height. Add ConsensusTime and ConsensusHeight to block. (#170)
Diffstat (limited to 'core/compaction-chain.go')
-rw-r--r-- | core/compaction-chain.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/compaction-chain.go b/core/compaction-chain.go index 21b8412..c6d423d 100644 --- a/core/compaction-chain.go +++ b/core/compaction-chain.go @@ -59,7 +59,7 @@ func (cc *compactionChain) sanityCheck(witnessBlock *types.Block) error { func (cc *compactionChain) processBlock(block *types.Block) error { prevBlock := cc.lastBlock() if prevBlock != nil { - block.Witness.Height = prevBlock.Witness.Height + 1 + block.ConsensusHeight = prevBlock.ConsensusHeight + 1 } cc.prevBlockLock.Lock() defer cc.prevBlockLock.Unlock() |