Skip to content
  • denyeart's avatar
    [FAB-2498] Fix Panic upon Recover (CouchdB) · 8b172f58
    denyeart authored
    
    
    If peers starts up and there is no CouchDB state database,
    there is a nil pointer panic due to nil savepoint.
    
    This changeset fixes it by returning nil height
    when there is nil savepont.  Nil height for savepoint
    will trigger full state db recovery upon peer startup.
    
    Added test to ensure nil height is returned in these cases.
    
    Ensured that leveldb and couchdb behave consistently now.
    
    Tested recovery on both leveldb and couchdb.
    
    Change-Id: I0f2f2f89d7d3176fcf4a560d20665bd59c4d8a5d
    Signed-off-by: default avatardenyeart <enyeart@us.ibm.com>
    8b172f58