refactor!: deprecate blocktime on context (#17738)
This commit is contained in:
@@ -6,6 +6,7 @@ import (
|
||||
"github.com/golang/mock/gomock"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cosmossdk.io/core/header"
|
||||
sdkmath "cosmossdk.io/math"
|
||||
storetypes "cosmossdk.io/store/types"
|
||||
"cosmossdk.io/x/feegrant"
|
||||
@@ -34,7 +35,7 @@ func TestFeegrantPruning(t *testing.T) {
|
||||
granter3 := addrs[2]
|
||||
grantee := addrs[3]
|
||||
spendLimit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(1000)))
|
||||
now := testCtx.Ctx.BlockTime()
|
||||
now := testCtx.Ctx.HeaderInfo().Time
|
||||
oneDay := now.AddDate(0, 0, 1)
|
||||
|
||||
ctrl := gomock.NewController(t)
|
||||
@@ -91,7 +92,7 @@ func TestFeegrantPruning(t *testing.T) {
|
||||
require.NotNil(t, res)
|
||||
require.Len(t, res.Allowances, 2)
|
||||
|
||||
testCtx.Ctx = testCtx.Ctx.WithBlockTime(now.AddDate(0, 0, 2))
|
||||
testCtx.Ctx = testCtx.Ctx.WithHeaderInfo(header.Info{Time: now.AddDate(0, 0, 2)})
|
||||
module.EndBlocker(testCtx.Ctx, feegrantKeeper)
|
||||
|
||||
res, err = queryClient.Allowances(testCtx.Ctx.Context(), &feegrant.QueryAllowancesRequest{
|
||||
|
||||
Reference in New Issue
Block a user