diff options
author | Wei-Ning Huang <w@cobinhood.com> | 2018-09-18 14:39:31 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-03-07 18:45:19 +0800 |
commit | c29d94696b7ad66830477d2cdcf27007c7573efd (patch) | |
tree | 18f9ffab7af230c738a1ead152dd21213913947a /dex | |
parent | 3a58af701d4c2b85ca13da7c91c5e03f90a9ae0c (diff) | |
download | dexon-c29d94696b7ad66830477d2cdcf27007c7573efd.tar.gz dexon-c29d94696b7ad66830477d2cdcf27007c7573efd.tar.zst dexon-c29d94696b7ad66830477d2cdcf27007c7573efd.zip |
Add udpated governance interface and app interface
Diffstat (limited to 'dex')
-rw-r--r-- | dex/app.go | 4 | ||||
-rw-r--r-- | dex/governance.go | 32 |
2 files changed, 34 insertions, 2 deletions
diff --git a/dex/app.go b/dex/app.go index 9ab9dd45e..5aa1f6e35 100644 --- a/dex/app.go +++ b/dex/app.go @@ -29,11 +29,11 @@ type DexconApp struct { } // PreparePayload is called when consensus core is preparing a block. -func (d *DexconApp) PreparePayloads(position types.Position) [][]byte { +func (d *DexconApp) PreparePayloads(position types.Position) []byte { } // VerifyPayloads verifies if the payloads are valid. -func (d *DexconApp) VerifyPayloads(payloads [][]byte) bool { +func (d *DexconApp) VerifyPayloads(payloads []byte) bool { } // BlockConfirmed is called when a block is confirmed and added to lattice. diff --git a/dex/governance.go b/dex/governance.go new file mode 100644 index 000000000..cb696e42c --- /dev/null +++ b/dex/governance.go @@ -0,0 +1,32 @@ +package dex + +import ( + "github.com/dexon-foundation/dexon-consensus-core/core/types" +) + +type DexconGovernance struct { +} + +// GetValidatorSet returns the current notary set. +func (d *DexconGovernance) GetNotarySet() map[types.ValidatorID]struct{} { +} + +// GetTotalOrderingK return the total ordering K constant. +func (d *DexconGovernance) GetCCP() types.CCP { +} + +// AddDKGComplaint adds a DKGComplaint. +func (d *DexconGovernance) AddDKGComplaint(complaint *types.DKGComplaint) { +} + +// GetDKGComplaints gets all the DKGComplaints of round. +func (d *DexconGovernance) DKGComplaints(round uint64) []*types.DKGComplaint { +} + +// AddDKGMasterPublicKey adds a DKGMasterPublicKey. +func (d *DexconGovernance) AddDKGMasterPublicKey(masterPublicKey *types.DKGMasterPublicKey) { +} + +// DKGMasterPublicKeys gets all the DKGMasterPublicKey of round. +func (d *DexconGovernance) DKGMasterPublicKeys(round uint64) []*types.DKGMasterPublicKey { +} |