diff --git a/go/host/storage/hostdb/rollup.go b/go/host/storage/hostdb/rollup.go index 3ccfffef5f..9be5030735 100644 --- a/go/host/storage/hostdb/rollup.go +++ b/go/host/storage/hostdb/rollup.go @@ -246,9 +246,9 @@ func fetchTotalRollups(db *sql.DB) (*big.Int, error) { err := db.QueryRow(selectLatestRollupCount).Scan(&total) if err != nil { if errors.Is(err, sql.ErrNoRows) { - return nil, errutil.ErrNotFound + return big.NewInt(0), errutil.ErrNotFound } - return nil, fmt.Errorf("failed to fetch rollup latest rollup ID: %w", err) + return big.NewInt(0), fmt.Errorf("failed to fetch rollup latest rollup ID: %w", err) } bigTotal := big.NewInt(int64(total))