Fix empty state snapshots

This commit is contained in:
Neil Alexander 2021-04-15 09:18:43 +01:00
parent a799847070
commit b7cf702a14
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
4 changed files with 5 additions and 9 deletions

View file

@ -215,7 +215,7 @@ func (d *Database) StateEntries(
) ([]types.StateEntry, error) {
nids, err := d.StateTable.BulkSelectState(ctx, []types.StateSnapshotNID{stateSnapshotNID})
if err != nil {
return nil, fmt.Errorf("d.StateTable.BulkSelectState: %w", err)
return nil, fmt.Errorf("d.StateTable.BulkSelectState: %w (ID %d)", err, stateSnapshotNID)
}
state, ok := nids[stateSnapshotNID]
if !ok {