Skip to content

Commit

Permalink
Ignore Version during Set Earliest Version (#1968)
Browse files Browse the repository at this point in the history
* Ignore Version during Set Earliest Version

* Bump sei cosmos seidb
  • Loading branch information
Kbhat1 authored Nov 27, 2024
1 parent fd82b53 commit 281a836
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion app/test_state_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func (s *InMemoryStateStore) GetEarliestVersion() (int64, error) {
return s.earliestVersion, nil
}

func (s *InMemoryStateStore) SetEarliestVersion(version int64) error {
func (s *InMemoryStateStore) SetEarliestVersion(version int64, ignoreVersion bool) error {
s.mu.Lock()
defer s.mu.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion app/test_state_store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func TestGetLatestVersionAndSetLatestVersion(t *testing.T) {
func TestGetEarliestVersionAndSetEarliestVersion(t *testing.T) {
store := NewInMemoryStateStore()

err := store.SetEarliestVersion(1)
err := store.SetEarliestVersion(1, false)
assert.NoError(t, err)

version, err := store.GetEarliestVersion()
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,12 @@ require (
replace (
github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.8
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.48
github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0
github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2
github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.46
// Latest goleveldb is broken, we have to stick to this version
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.4.3
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1347,10 +1347,10 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c
github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241126162048-86648c51118c/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ=
github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA=
github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8=
github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs=
github.com/sei-protocol/sei-cosmos v0.3.45/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk=
github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o=
github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA=
github.com/sei-protocol/sei-cosmos v0.3.48 h1:kSDweeTaLZ4TByLqAD6/hmtgAhAJHwXU1beyqsVXJkQ=
github.com/sei-protocol/sei-cosmos v0.3.48/go.mod h1:XC417pB6NwxP/cQ2XTSZLzVnP8dMZ//4uCXS3SxFgoM=
github.com/sei-protocol/sei-db v0.0.46 h1:naXfSp1I3UgJJm/iSvXpdFzr9nofEOxp/EekcAVj7wY=
github.com/sei-protocol/sei-db v0.0.46/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA=
github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I=
github.com/sei-protocol/sei-iavl v0.2.0/go.mod h1:qRf8QYUPfrAO7K6VDB2B2l/N7K5L76OorioGBcJBIbw=
github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 h1:BaMZ6gjwqe3R/5dLmcJ1TkSZ3omcWy2TjaAZAeOJH44=
Expand Down
2 changes: 1 addition & 1 deletion tools/migration/ss/migrator.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (m *Migrator) Migrate(version int64, homeDir string) error {
}

// Set earliest and latest version in the database
err = m.stateStore.SetEarliestVersion(1)
err = m.stateStore.SetEarliestVersion(1, true)
if err != nil {
return err
}
Expand Down

0 comments on commit 281a836

Please sign in to comment.