From 6deec4c5f4283de13ed94083b1de99be762b87f8 Mon Sep 17 00:00:00 2001 From: vyzo Date: Mon, 13 Mar 2023 17:26:20 +0200 Subject: [PATCH] lint --- cmd/lotus-shed/msgindex.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmd/lotus-shed/msgindex.go b/cmd/lotus-shed/msgindex.go index f04b47599..d2cb2cf3d 100644 --- a/cmd/lotus-shed/msgindex.go +++ b/cmd/lotus-shed/msgindex.go @@ -83,6 +83,10 @@ var msgindexBackfillCmd = &cli.Command{ } insertStmt, err := tx.Prepare("INSERT INTO messages VALUES (?, ?, ?)") + if err != nil { + return err + } + insertMsg := func(cid, tsCid cid.Cid, epoch abi.ChainEpoch) error { key := cid.String() tskey := tsCid.String() @@ -190,7 +194,7 @@ var msgindexPruneCmd = &cli.Command{ return err } - if _, err := tx.Exec("DELETE FROM messages WHERE epoch < ?", int64(startHeight)); err != nil { + if _, err := tx.Exec("DELETE FROM messages WHERE epoch < ?", startHeight); err != nil { if err := tx.Rollback(); err != nil { fmt.Printf("ERROR: rollback: %s", err) }