aboutsummaryrefslogtreecommitdiffstats
path: root/simulation/app.go
diff options
context:
space:
mode:
Diffstat (limited to 'simulation/app.go')
-rw-r--r--simulation/app.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/simulation/app.go b/simulation/app.go
index 78e1d9a..f12290c 100644
--- a/simulation/app.go
+++ b/simulation/app.go
@@ -54,7 +54,8 @@ func newSimApp(id types.ValidatorID, Network PeerServerNetwork) *simApp {
}
}
-func (a *simApp) addBlock(block *types.Block) {
+// BlockConfirmed implements core.Application.
+func (a *simApp) BlockConfirmed(block *types.Block) {
a.blockByHashMutex.Lock()
defer a.blockByHashMutex.Unlock()
@@ -62,6 +63,11 @@ func (a *simApp) addBlock(block *types.Block) {
a.blockByHash[block.Hash] = block
}
+// VerifyPayloads implements core.Application.
+func (a *simApp) VerifyPayloads(payloads [][]byte) bool {
+ return true
+}
+
// getAckedBlocks will return all unconfirmed blocks' hash with lower Height
// than the block with ackHash.
func (a *simApp) getAckedBlocks(ackHash common.Hash) (output common.Hashes) {
@@ -101,7 +107,6 @@ func (a *simApp) StronglyAcked(blockHash common.Hash) {
// TotalOrderingDeliver is called when blocks are delivered by the total
// ordering algorithm.
func (a *simApp) TotalOrderingDeliver(blockHashes common.Hashes, early bool) {
-
now := time.Now()
blocks := make([]*types.Block, len(blockHashes))
a.blockByHashMutex.RLock()