From 3a551bce99e1a576954f4bdd3cca7cda30ccdae3 Mon Sep 17 00:00:00 2001 From: Prathamesh Musale Date: Thu, 24 Oct 2024 05:25:24 +0000 Subject: [PATCH] Reset block height for imported authorities (#61) Part of [Create a public laconicd testnet](https://www.notion.so/Create-a-public-laconicd-testnet-896a11bdd8094eff8f1b49c0be0ca3b8) - Reset block height for authorities being imported from genesis, same is being done for name records Reviewed-on: https://git.vdb.to/cerc-io/laconicd/pulls/61 Co-authored-by: Prathamesh Musale Co-committed-by: Prathamesh Musale --- x/registry/keeper/genesis.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x/registry/keeper/genesis.go b/x/registry/keeper/genesis.go index 99649a43..9618253c 100644 --- a/x/registry/keeper/genesis.go +++ b/x/registry/keeper/genesis.go @@ -40,6 +40,8 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, data *registry.GenesisState) error for _, authority := range data.Authorities { // Only import authorities that are marked active. if authority.Entry.Status == registry.AuthorityActive { + // Reset authority height + authority.Entry.Height = uint64(ctx.BlockHeight()) if err := k.SaveNameAuthority(ctx, authority.Name, authority.Entry); err != nil { return err }