Address review comments

This commit is contained in:
Fridrik Asmundsson 2023-03-28 17:08:53 +02:00
parent 83e2408f81
commit ecd13079e7

View File

@ -211,13 +211,9 @@ func PopulateAfterSnapshot(lctx context.Context, basePath string, cs ChainStore)
insertStmt, err := tx.Prepare(dbqInsertMessage) insertStmt, err := tx.Prepare(dbqInsertMessage)
if err != nil { if err != nil {
rollback()
return xerrors.Errorf("error preparing insertStmt: %w", err) return xerrors.Errorf("error preparing insertStmt: %w", err)
} }
defer func() {
if err := insertStmt.Close(); err != nil {
log.Errorf("error closing insert statement: %s", err)
}
}()
curTs := cs.GetHeaviestTipSet() curTs := cs.GetHeaviestTipSet()
startHeight := curTs.Height() startHeight := curTs.Height()