Skip to content

Commit

Permalink
fix(upgrade): stakingKeeper instance
Browse files Browse the repository at this point in the history
  • Loading branch information
bdeneux committed Apr 7, 2023
1 parent 492122d commit 0dd7980
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 43 deletions.
12 changes: 6 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ func New(
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

stakingKeeper := stakingkeeper.NewKeeper(
app.StakingKeeper = stakingkeeper.NewKeeper(
appCodec,
keys[stakingtypes.StoreKey],
app.AccountKeeper,
Expand All @@ -424,7 +424,7 @@ func New(
appCodec,
keys[minttypes.StoreKey],
authtypes.NewModuleAddress(govtypes.ModuleName),
stakingKeeper,
app.StakingKeeper,
app.AccountKeeper,
app.BankKeeper,
authtypes.FeeCollectorName,
Expand All @@ -435,7 +435,7 @@ func New(
keys[distrtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
stakingKeeper,
app.StakingKeeper,
authtypes.FeeCollectorName,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)
Expand All @@ -444,7 +444,7 @@ func New(
appCodec,
cdc,
keys[slashingtypes.StoreKey],
stakingKeeper,
app.StakingKeeper,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
)

Expand Down Expand Up @@ -610,7 +610,7 @@ func New(
keys[govtypes.StoreKey],
app.AccountKeeper,
app.BankKeeper,
stakingKeeper,
app.StakingKeeper,
app.MsgServiceRouter(),
govConfig,
authtypes.NewModuleAddress(govtypes.ModuleName).String(),
Expand Down Expand Up @@ -656,7 +656,7 @@ func New(
),
)

stakingKeeper.SetHooks(
app.StakingKeeper.SetHooks(
stakingtypes.NewMultiStakingHooks(app.DistrKeeper.Hooks(), app.SlashingKeeper.Hooks()),
)

Expand Down
16 changes: 15 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ require (
github.com/golang/protobuf v1.5.3
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/ichiban/prolog v1.1.0
github.com/ignite/cli v0.26.1
github.com/ignite/cli v0.0.0-20230401195643-4098ae9a5941
github.com/nuts-foundation/go-did v0.4.0
github.com/prometheus/client_golang v1.14.0
github.com/samber/lo v1.38.1
Expand All @@ -32,6 +32,19 @@ require (
sigs.k8s.io/yaml v1.3.0
)

replace (
github.com/99designs/keyring => github.com/cosmos/keyring v1.2.0
// dgrijalva/jwt-go is deprecated and doesn't receive security updates.
// See: https://github.com/cosmos/cosmos-sdk/issues/13134
github.com/dgrijalva/jwt-go => github.com/golang-jwt/jwt/v4 v4.4.2
// Fix upstream GHSA-h395-qcrw-5vmq vulnerability.
// See: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.8.1

// pin version! 126854af5e6d has issues with the store so that queries fail
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
)

require (
cloud.google.com/go v0.110.0 // indirect
cloud.google.com/go/compute v1.18.0 // indirect
Expand Down Expand Up @@ -85,6 +98,7 @@ require (
github.com/goccy/go-json v0.9.11 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/glog v1.1.0 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/snappy v0.0.4 // indirect
Expand Down
Loading

0 comments on commit 0dd7980

Please sign in to comment.