diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-08-08 19:32:20 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-08-08 19:32:20 +0800 |
commit | 295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785 (patch) | |
tree | bdb93aaa638ec890596a18490505a45204dc2cc7 /core/governance.go | |
parent | a418ea95c0f5afb50cbb78aedecc68373353d06e (diff) | |
download | dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.gz dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.bz2 dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.lz dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.xz dexon-consensus-295c7b5efbc36f59e3ae8d10bc3abc3a5d17e785.tar.zst dexon-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/governance.go')
-rw-r--r-- | core/governance.go | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/core/governance.go b/core/governance.go index bd6354d..a7069a5 100644 --- a/core/governance.go +++ b/core/governance.go @@ -23,21 +23,6 @@ import ( "github.com/dexon-foundation/dexon-consensus-core/core/types" ) -// MembershipActionType specifies the action of a membership event. -type MembershipActionType int - -// Event enums. -const ( - MembershipActionAdd MembershipActionType = 0 - MembershipActionDelete MembershipActionType = 1 -) - -// MembershipEvent specifies the event of membership changes. -type MembershipEvent struct { - Epoch int - Action MembershipActionType -} - // Governance interface specifies interface to control the governance contract. // Note that there are a lot more methods in the governance contract, that this // interface only define those that are required to run the consensus algorithm. @@ -49,5 +34,5 @@ type Governance interface { GetBlockProposingInterval() int // Get membership events after a certain epoch. - GetMembershipEvents(epoch int) []MembershipEvent + GetMembershipEvents(epoch int) []types.MembershipEvent } |