diff options
Diffstat (limited to 'core/application.go')
-rw-r--r-- | core/application.go | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/core/application.go b/core/application.go index 7eca66e..edeb686 100644 --- a/core/application.go +++ b/core/application.go @@ -17,11 +17,20 @@ package core -import "github.com/dexon-foundation/dexon-consensus-core/core/types" +import ( + "time" + + "github.com/dexon-foundation/dexon-consensus-core/common" + "github.com/dexon-foundation/dexon-consensus-core/core/types" +) // Application describes the application interface that interacts with DEXON // consensus core. type Application interface { - ValidateBlock(b *types.Block) bool - Deliver(blocks []*types.Block, early bool) + // TotalOrderingDeliver is called when the total ordering algorithm deliver + // a set of block. + TotalOrderingDeliver(blocks []*types.Block, early bool) + + // DeliverBlock is called when a block is add to the compaction chain. + DeliverBlock(blockHash common.Hash, timestamp time.Time) } |