aboutsummaryrefslogtreecommitdiffstats
path: root/core/test
diff options
context:
space:
mode:
Diffstat (limited to 'core/test')
-rw-r--r--core/test/app.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/core/test/app.go b/core/test/app.go
index 0a17f13..4cfd580 100644
--- a/core/test/app.go
+++ b/core/test/app.go
@@ -208,6 +208,15 @@ func (app *App) BlockConfirmed(b types.Block) {
app.LastConfirmedHeight = b.Position.Height
}
+// ClearUndeliveredBlocks --
+func (app *App) ClearUndeliveredBlocks() {
+ app.deliveredLock.RLock()
+ defer app.deliveredLock.RUnlock()
+ app.confirmedLock.Lock()
+ defer app.confirmedLock.Unlock()
+ app.LastConfirmedHeight = uint64(len(app.DeliverSequence) - 1)
+}
+
// BlockDelivered implements Application interface.
func (app *App) BlockDelivered(blockHash common.Hash, pos types.Position,
result types.FinalizationResult) {