From 9350fc95f37cc540512d324a247d098a05749b0b Mon Sep 17 00:00:00 2001 From: Thomas Bruyelle Date: Sat, 18 Jan 2025 15:06:44 +0100 Subject: [PATCH] fix: add block time --- tally_genesis.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tally_genesis.go b/tally_genesis.go index 564069d..c482c8b 100644 --- a/tally_genesis.go +++ b/tally_genesis.go @@ -5,6 +5,7 @@ import ( "encoding/json" "fmt" "os" + "time" "github.com/atomone-hub/atomone/cmd/atomoned/cmd" "github.com/atomone-hub/atomone/x/gov" @@ -283,7 +284,8 @@ func newContext(ctx context.Context, keys map[string]*storetypes.KVStoreKey) sdk if err != nil { panic(err) } - return sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger()).WithContext(ctx) + return sdk.NewContext(cms, tmproto.Header{}, false, log.NewNopLogger()). + WithContext(ctx).WithBlockTime(time.Now()) } func convertAddrsToGovAddrs(addrs []sdk.AccAddress) []govtypes.GovernorAddress {