Skip to content

Commit

Permalink
Fix error message for wrong version
Browse files Browse the repository at this point in the history
  • Loading branch information
jaekwon committed Dec 9, 2017
1 parent 60a22e3 commit aab439c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nodedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ func (ndb *nodeDB) saveRoot(hash []byte, version int64) error {
defer ndb.mtx.Unlock()

if version != ndb.getLatestVersion()+1 {
return errors.New("can't save root with lower or equal version than latest")
return fmt.Errorf("Must save consecutive versions. Expected %d, got %d", ndb.getLatestVersion()+1, version)
}

key := ndb.rootKey(version)
Expand Down

0 comments on commit aab439c

Please sign in to comment.