From 4500274b03cbd312053eed363ee741f4d78871d5 Mon Sep 17 00:00:00 2001 From: "mergify[bot]" <37929162+mergify[bot]@users.noreply.github.com> Date: Tue, 13 Sep 2022 09:42:00 +0100 Subject: [PATCH] chore: add IsMiddlewareEnabled key to simulation store decoder (#2215) (#2276) --- modules/apps/27-interchain-accounts/simulation/decoder.go | 2 ++ .../apps/27-interchain-accounts/simulation/decoder_test.go | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/modules/apps/27-interchain-accounts/simulation/decoder.go b/modules/apps/27-interchain-accounts/simulation/decoder.go index 706a4c3cbee..f7cf670f665 100644 --- a/modules/apps/27-interchain-accounts/simulation/decoder.go +++ b/modules/apps/27-interchain-accounts/simulation/decoder.go @@ -20,6 +20,8 @@ func NewDecodeStore() func(kvA, kvB kv.Pair) string { return fmt.Sprintf("Owner A: %s\nOwner B: %s", string(kvA.Value), string(kvB.Value)) case bytes.Equal(kvA.Key[:len(types.ActiveChannelKeyPrefix)], []byte(types.ActiveChannelKeyPrefix)): return fmt.Sprintf("ActiveChannel A: %s\nActiveChannel B: %s", string(kvA.Value), string(kvB.Value)) + case bytes.Equal(kvA.Key[:len(types.IsMiddlewareEnabledPrefix)], []byte(types.IsMiddlewareEnabledPrefix)): + return fmt.Sprintf("IsMiddlewareEnabled A: %s\nIsMiddlewareEnabled B: %s", string(kvA.Value), string(kvB.Value)) default: panic(fmt.Sprintf("invalid %s key prefix %s", types.ModuleName, kvA.Key)) diff --git a/modules/apps/27-interchain-accounts/simulation/decoder_test.go b/modules/apps/27-interchain-accounts/simulation/decoder_test.go index e46124920ad..9be5aab9ced 100644 --- a/modules/apps/27-interchain-accounts/simulation/decoder_test.go +++ b/modules/apps/27-interchain-accounts/simulation/decoder_test.go @@ -34,6 +34,10 @@ func TestDecodeStore(t *testing.T) { Key: []byte(types.ActiveChannelKeyPrefix), Value: []byte("channel-0"), }, + { + Key: []byte(types.IsMiddlewareEnabledPrefix), + Value: []byte("false"), + }, }, } tests := []struct { @@ -43,6 +47,7 @@ func TestDecodeStore(t *testing.T) { {"PortID", fmt.Sprintf("Port A: %s\nPort B: %s", types.PortID, types.PortID)}, {"Owner", fmt.Sprintf("Owner A: %s\nOwner B: %s", owner, owner)}, {"ActiveChannel", fmt.Sprintf("ActiveChannel A: %s\nActiveChannel B: %s", channelID, channelID)}, + {"IsMiddlewareEnabled", fmt.Sprintf("IsMiddlewareEnabled A: %s\nIsMiddlewareEnabled B: %s", "false", "false")}, {"other", ""}, }