aboutsummaryrefslogtreecommitdiffstats
path: root/core/interfaces.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-10-11 17:04:06 +0800
committerGitHub <noreply@github.com>2018-10-11 17:04:06 +0800
commitf3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c (patch)
tree7922df506e8f508b81dfbfde35ececb6f8b07fdf /core/interfaces.go
parenta13f15bf54a2c10e5223779877778da0eebb4855 (diff)
downloaddexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar.gz
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar.bz2
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar.lz
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar.xz
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.tar.zst
dexon-consensus-f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c.zip
core: Move BlockConfirmed to Application interface (#192)
When a block is confirmed, all its txs are permitted to be executed. Therefore, exporting this method provides more and earlier information about txs to be executed, and helps application layer to process txs more efficiently.
Diffstat (limited to 'core/interfaces.go')
-rw-r--r--core/interfaces.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/interfaces.go b/core/interfaces.go
index f4a6cd0..98cbb4d 100644
--- a/core/interfaces.go
+++ b/core/interfaces.go
@@ -37,6 +37,9 @@ type Application interface {
// VerifyBlock verifies if the block is valid.
VerifyBlock(block *types.Block) bool
+ // BlockConfirmed is called when a block is confirmed and added to lattice.
+ BlockConfirmed(blockHash common.Hash)
+
// BlockDelivered is called when a block is add to the compaction chain.
BlockDelivered(block types.Block)
}
@@ -44,9 +47,6 @@ type Application interface {
// Debug describes the application interface that requires
// more detailed consensus execution.
type Debug interface {
- // BlockConfirmed is called when a block is confirmed and added to lattice.
- BlockConfirmed(blockHash common.Hash)
-
// StronglyAcked is called when a block is strongly acked.
StronglyAcked(blockHash common.Hash)