aboutsummaryrefslogtreecommitdiffstats
path: root/core/compaction-chain.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-04 14:56:00 +0800
committerGitHub <noreply@github.com>2018-10-04 14:56:00 +0800
commit149e918f4fc78632483bf549dd8f5ffe55366e18 (patch)
treefeabcb67103d76cc829ea81a1d57735e71db23d8 /core/compaction-chain.go
parent519cc8a734a510f44463b8dd175b7505f0308a22 (diff)
downloaddexon-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.go2
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()