From 2ff7e80718075b982efae912fa0fb86895fab403 Mon Sep 17 00:00:00 2001
From: Silas Davis <silas@erisindustries.com>
Date: Sat, 20 Aug 2016 12:55:16 +0100
Subject: [PATCH] Don't special case empty blocks when refreshing the
 checkCache on commit

---
 manager/eris-mint/eris-mint.go | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/manager/eris-mint/eris-mint.go b/manager/eris-mint/eris-mint.go
index d15f75cd..4375a199 100644
--- a/manager/eris-mint/eris-mint.go
+++ b/manager/eris-mint/eris-mint.go
@@ -185,14 +185,11 @@ func (app *ErisMint) Commit() (res tmsp.Result) {
 	// sync the AppendTx cache
 	app.cache.Sync()
 
-	// if there were any txs in the block,
-	// reset the check cache to the new height
-	if app.nTxs > 0 {
-		log.WithFields(log.Fields{
-			"txs": app.nTxs,
-		}).Info("Reset checkCache")
-		app.checkCache = sm.NewBlockCache(app.state)
-	}
+	// Refresh the checkCache with the latest commited state
+	log.WithFields(log.Fields{
+		"txs": app.nTxs,
+	}).Info("Reset checkCache")
+	app.checkCache = sm.NewBlockCache(app.state)
 	app.nTxs = 0
 
 	// save state to disk
-- 
GitLab