aboutsummaryrefslogtreecommitdiffstats
path: root/core/interfaces.go
diff options
context:
space:
mode:
authorhaoping-ku <haoping.ku@dexon.org>2018-12-05 17:38:03 +0800
committerGitHub <noreply@github.com>2018-12-05 17:38:03 +0800
commit4eb02f1dd96e136b0f7cf7eff792da1e44176713 (patch)
tree3757739bff31ce4b9cb7ff45be572f9858fc19e9 /core/interfaces.go
parent1f48b590f6e9a6d3fd773846a3d8ba1b7f0419e6 (diff)
downloadtangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.gz
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.bz2
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.lz
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.xz
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.tar.zst
tangerine-consensus-4eb02f1dd96e136b0f7cf7eff792da1e44176713.zip
Haoping fix simulation (#356)
* simulation: add benchmark features * tmp * simulation: modify Debug interface * Added BlockReceived and BlockReady function to Debug interface. * Added Benchmark features. * fix * fix typos
Diffstat (limited to 'core/interfaces.go')
-rw-r--r--core/interfaces.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/interfaces.go b/core/interfaces.go
index 6979854..2ebfe86 100644
--- a/core/interfaces.go
+++ b/core/interfaces.go
@@ -41,7 +41,7 @@ type Application interface {
// BlockConfirmed is called when a block is confirmed and added to lattice.
BlockConfirmed(block types.Block)
- // BlockDelivered is called when a block is add to the compaction chain.
+ // BlockDelivered is called when a block is added to the compaction chain.
BlockDelivered(blockHash common.Hash,
blockPosition types.Position, result types.FinalizationResult)
}
@@ -49,9 +49,13 @@ type Application interface {
// Debug describes the application interface that requires
// more detailed consensus execution.
type Debug interface {
+ // BlockReceived is called when the block received in agreement.
+ BlockReceived(common.Hash)
// TotalOrderingDelivered is called when the total ordering algorithm deliver
// a set of block.
TotalOrderingDelivered(common.Hashes, uint32)
+ // BlockReady is called when the block's randomness is ready.
+ BlockReady(common.Hash)
}
// Network describs the network interface that interacts with DEXON consensus