From ba518f7c7e6bed89844b6a050959a19905e1651e Mon Sep 17 00:00:00 2001 From: vimystic <122659254+vimystic@users.noreply.github.com> Date: Thu, 28 Sep 2023 02:45:37 -0600 Subject: [PATCH] Error check will occur in Set --- x/mailbox/keeper/genesis.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/mailbox/keeper/genesis.go b/x/mailbox/keeper/genesis.go index cf6aa89..a0bd128 100644 --- a/x/mailbox/keeper/genesis.go +++ b/x/mailbox/keeper/genesis.go @@ -26,11 +26,10 @@ func (k *Keeper) InitGenesis(ctx sdk.Context, gs *types.GenesisState) error { return nil } -func (k *Keeper) StoreBranch(ctx sdk.Context, index uint32, message []byte) error { +func (k *Keeper) StoreBranch(ctx sdk.Context, index uint32, message []byte) { store := ctx.KVStore(k.storeKey) - key := fmt.Sprintf("imt/%s", strconv.FormatUint(uint64(index), 10)) + key := fmt.Sprintf("imt/%d", index) store.Set([]byte(key), message) - return nil } func (k *Keeper) ExportGenesis(ctx sdk.Context) *types.GenesisState {