summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShant Karakashian <55754073+algonautshant@users.noreply.github.com>2022-01-20 07:18:46 -0500
committerGitHub <noreply@github.com>2022-01-20 07:18:46 -0500
commit33b87c432065d3be0ce1fdad682604f416676133 (patch)
tree8bd76f7f7ae9ddc005db643a48173797e792b7c8
parent3a4c288c1faa30b8b39562fcb74946ed0959b44b (diff)
Fix worng message on restore crash db. (#3455)
When crash state is found but could not be restored, noCrashState variable is used to report a warning. However, this variable was set to false in a case where there was no crash state, and the wrong warning was reported.
-rw-r--r--agreement/persistence.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/agreement/persistence.go b/agreement/persistence.go
index d92abbd1e..aef2a0f60 100644
--- a/agreement/persistence.go
+++ b/agreement/persistence.go
@@ -125,6 +125,7 @@ func restore(log logging.Logger, crash db.Accessor) (raw []byte, err error) {
// the above call was completed sucecssfully, which means that we've just created the table ( which wasn't there ! ).
// in that case, the table is guaranteed to be empty, and therefore we can return right here.
log.Infof("restore (agreement): crash state table initialized")
+ noCrashState = true // this is a normal case (we don't have crash state)
err = errNoCrashStateAvailable
return
}