refactor!: deprecate blocktime on context (#17738)

This commit is contained in:
Marko
2023-09-18 13:55:21 +00:00
committed by GitHub
parent 8df065b611
commit 6615ff4f76
89 changed files with 379 additions and 369 deletions
+2 -1
View File
@@ -8,6 +8,7 @@ import (
dbm "github.com/cosmos/cosmos-db"
"gotest.tools/v3/assert"
"cosmossdk.io/core/header"
"cosmossdk.io/depinject"
"cosmossdk.io/log"
@@ -163,7 +164,7 @@ func TestImportExportQueues(t *testing.T) {
params, err = s2.GovKeeper.Params.Get(ctx2)
assert.NilError(t, err)
// Jump the time forward past the DepositPeriod and VotingPeriod
ctx2 = ctx2.WithBlockTime(ctx2.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod))
ctx2 = ctx2.WithHeaderInfo(header.Info{Time: ctx2.BlockHeader().Time.Add(*params.MaxDepositPeriod).Add(*params.VotingPeriod)})
// Make sure that they are still in the DepositPeriod and VotingPeriod respectively
proposal1, err = s2.GovKeeper.Proposals.Get(ctx2, proposalID1)