Reset block height for imported authorities (#61)
All checks were successful
Integration Tests / test-integration (push) Successful in 2m31s
E2E Tests / test-e2e (push) Successful in 3m56s
Unit Tests / test-unit (push) Successful in 2m5s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 9m13s
SDK Tests / sdk_tests_authority_auctions (push) Successful in 14m55s
SDK Tests / sdk_tests (push) Successful in 19m16s
All checks were successful
Integration Tests / test-integration (push) Successful in 2m31s
E2E Tests / test-e2e (push) Successful in 3m56s
Unit Tests / test-unit (push) Successful in 2m5s
SDK Tests / sdk_tests_nameservice_expiry (push) Successful in 9m13s
SDK Tests / sdk_tests_authority_auctions (push) Successful in 14m55s
SDK Tests / sdk_tests (push) Successful in 19m16s
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: #61 Co-authored-by: Prathamesh Musale <prathamesh.musale0@gmail.com> Co-committed-by: Prathamesh Musale <prathamesh.musale0@gmail.com>
This commit is contained in:
parent
6f75370b17
commit
3a551bce99
@ -40,6 +40,8 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, data *registry.GenesisState) error
|
|||||||
for _, authority := range data.Authorities {
|
for _, authority := range data.Authorities {
|
||||||
// Only import authorities that are marked active.
|
// Only import authorities that are marked active.
|
||||||
if authority.Entry.Status == registry.AuthorityActive {
|
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 {
|
if err := k.SaveNameAuthority(ctx, authority.Name, authority.Entry); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user