aboutsummaryrefslogtreecommitdiffstats
path: root/core/interfaces.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/interfaces.go')
-rw-r--r--core/interfaces.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/interfaces.go b/core/interfaces.go
index 7a5859e..4a20354 100644
--- a/core/interfaces.go
+++ b/core/interfaces.go
@@ -29,10 +29,10 @@ import (
// consensus core.
type Application interface {
// PreparePayload is called when consensus core is preparing a block.
- PreparePayload(position types.Position) []byte
+ PreparePayload(position types.Position) ([]byte, error)
// PrepareWitness will return the witness data no lower than consensusHeight.
- PrepareWitness(consensusHeight uint64) types.Witness
+ PrepareWitness(consensusHeight uint64) (types.Witness, error)
// VerifyBlock verifies if the block is valid.
VerifyBlock(block *types.Block) bool
@@ -103,6 +103,10 @@ type Governance interface {
// Return the genesis node set if round == 0.
NodeSet(round uint64) []crypto.PublicKey
+ // NotifyRoundHeight notifies governance contract to generate configuration
+ // for that round with the block on that consensus height.
+ NotifyRoundHeight(targetRound, consensusHeight uint64)
+
//// DKG-related methods.
// AddDKGComplaint adds a DKGComplaint.