aboutsummaryrefslogtreecommitdiffstats
path: root/core/application.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-08-08 19:32:20 +0800
committerWei-Ning Huang <aitjcize@gmail.com>2018-08-08 19:32:20 +0800
commit295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785 (patch)
treebdb93aaa638ec890596a18490505a45204dc2cc7 /core/application.go
parenta418ea95c0f5afb50cbb78aedecc68373353d06e (diff)
downloadtangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.gz
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.bz2
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.lz
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.xz
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.zst
tangerine-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.zip
core: Add Consensus to replace core.Blocklattice (#35)
* Make Sequencer return slice of blocks. * Fix naming issue The function 'getHeightVecto' would return ackingStatusVector. * Fix comment error. * Add methods to collect info when proposing blocks. * Add test.App * Add test.Gov * Move this type to core.types to avoid cyclic import. * Add core.Consensus * Move getMedianTime, interpoTime to util These functions are not depending on members of core.consensusTimestamp and is required when testing core.Consensus. * Make sure types.Block.Clone would copy critical fields. * Remove core.blocklattice * Define 'infinity' in core/total-ordering This definition is defined in core/blocklattice originally. * Fix a bug when processing the same block twice. * Integrate simulation with core.Consensus core.Consensus is a replacement of core.Blocklattice * Fix the comment to use sigular form. * Move lock mechanism to sub modules. * phi should be 2*fmax+1 * Fixup: should aborting when the validator is added * Fix for new block fields * Fix the bug that the total ordering sequence is wrong.
Diffstat (limited to 'core/application.go')
-rw-r--r--core/application.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/core/application.go b/core/application.go
index edeb686..763954d 100644
--- a/core/application.go
+++ b/core/application.go
@@ -27,8 +27,10 @@ import (
// Application describes the application interface that interacts with DEXON
// consensus core.
type Application interface {
- // TotalOrderingDeliver is called when the total ordering algorithm deliver
- // a set of block.
+ // StronglyAcked is called when a block is strongly acked.
+ StronglyAcked(blockHash common.Hash)
+
+ // TotalOrderingDeliver is called when the total ordering algorithm deliver // a set of block.
TotalOrderingDeliver(blocks []*types.Block, early bool)
// DeliverBlock is called when a block is add to the compaction chain.