Skip to content

Commit

Permalink
Merge pull request #161 from FactomProject/SOF-566
Browse files Browse the repository at this point in the history
Do not reject a directory block saved to the database.  We only save …
  • Loading branch information
gornik committed Jan 29, 2017
2 parents 1c6b6fe + 4dbc7a6 commit 6d44f8c
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions state/state.go
Expand Up @@ -964,10 +964,14 @@ func (s *State) LoadDBState(dbheight uint32) (interfaces.IMsg, error) {
if err != nil || nextABlock == nil {
pl := s.ProcessLists.Get(dbheight)
if pl == nil {
return nil, fmt.Errorf("Do not have signatures at height %d to validate DBStateMsg", dbheight)
}
for _, dbsig := range pl.DBSignatures {
allSigs = append(allSigs, dbsig.Signature)
dbkl, err := s.DB.FetchDBlockByHeight(dbheight)
if err != nil || dbkl == nil {
return nil, fmt.Errorf("Do not have signatures at height %d to validate DBStateMsg", dbheight)
}
} else {
for _, dbsig := range pl.DBSignatures {
allSigs = append(allSigs, dbsig.Signature)
}
}
} else {
abEntries := nextABlock.GetABEntries()
Expand Down

0 comments on commit 6d44f8c

Please sign in to comment.