diff --git a/modules/core/23-commitment/types/merkle_test.go b/modules/core/23-commitment/types/merkle_test.go index 74ea939abb9..17181358743 100644 --- a/modules/core/23-commitment/types/merkle_test.go +++ b/modules/core/23-commitment/types/merkle_test.go @@ -151,4 +151,12 @@ func TestApplyPrefix(t *testing.T) { prefixedPath, err := types.ApplyPrefix(prefix, path) require.NoError(t, err, "valid prefix returns error") require.Len(t, prefixedPath.GetKeyPath(), 2, "unexpected key path length") + + key0, err := prefixedPath.GetKey(0) + require.NoError(t, err, "get key 0 returns error") + require.Equal(t, prefix.KeyPrefix, key0, "key 0 does not match expected value") + + key1, err := prefixedPath.GetKey(1) + require.NoError(t, err, "get key 1 returns error") + require.Equal(t, []byte(pathStr), key1, "key 1 does not match expected value") }