refactor! : bump comet to v1 (#19726)

Co-authored-by: yihuang <yi.codeplayer@gmail.com>
This commit is contained in:
Marko
2024-05-06 14:12:00 +00:00
committed by GitHub
co-authored by yihuang
parent 89ccbc13d1
commit 0dfb54e36a
224 changed files with 6638 additions and 5959 deletions
+4 -4
View File
@@ -5,12 +5,12 @@ import (
"errors"
"fmt"
"io"
"math"
"math" // nolint:typecheck // this is used, false positive
"sort"
"strings"
"sync"
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
cmtproto "github.com/cometbft/cometbft/api/cometbft/types/v1"
dbm "github.com/cosmos/cosmos-db"
protoio "github.com/cosmos/gogoproto/io"
gogotypes "github.com/cosmos/gogoproto/types"
@@ -830,7 +830,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error {
keys := keysFromStoreKeyMap(rs.stores)
for _, key := range keys {
switch store := rs.GetCommitKVStore(key).(type) {
case *iavl.Store:
case *iavl.Store: // nolint:typecheck // ignore linting issues in v1
stores = append(stores, namedStore{name: key.Name(), Store: store})
case *transient.Store, *mem.Store:
// Non-persisted stores shouldn't be snapshotted
@@ -850,7 +850,7 @@ func (rs *Store) Snapshot(height uint64, protoWriter protoio.Writer) error {
// are demarcated by new SnapshotStore items.
for _, store := range stores {
rs.logger.Debug("starting snapshot", "store", store.name, "height", height)
exporter, err := store.Export(int64(height))
exporter, err := store.Export(int64(height)) // nolint:typecheck // ignore linting issues in v1
if err != nil {
rs.logger.Error("snapshot failed; exporter error", "store", store.name, "err", err)
return err