aboutsummaryrefslogtreecommitdiffstats
path: root/core/interfaces.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-31 13:34:00 +0800
committerGitHub <noreply@github.com>2018-08-31 13:34:00 +0800
commit18c6a28ff021c9dc643091b5dc420b51183253cf (patch)
tree3017ffcfc03532289b1856f5f9a1a83012eb5d8e /core/interfaces.go
parent123a7ee3bcf96c5bbef2ea16737d1a8e25f5ef30 (diff)
downloaddexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar.gz
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar.bz2
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar.lz
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar.xz
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.tar.zst
dexon-consensus-18c6a28ff021c9dc643091b5dc420b51183253cf.zip
Add methods to Application interface. (#86)
Diffstat (limited to 'core/interfaces.go')
-rw-r--r--core/interfaces.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/interfaces.go b/core/interfaces.go
index 364f2da..4376742 100644
--- a/core/interfaces.go
+++ b/core/interfaces.go
@@ -30,6 +30,12 @@ type Application interface {
// PreparePayload is called when consensus core is preparing a block.
PreparePayloads(shardID, chainID, height uint64) [][]byte
+ // VerifyPayloads verifies if the payloads are valid.
+ VerifyPayloads(payloads [][]byte) bool
+
+ // BlockConfirmed is called when a block is confirmed and added to lattice.
+ BlockConfirmed(block *types.Block)
+
// StronglyAcked is called when a block is strongly acked.
StronglyAcked(blockHash common.Hash)