diff --git a/x/capability/types/keys.go b/x/capability/types/keys.go index aefd13ba2286..27661135824c 100644 --- a/x/capability/types/keys.go +++ b/x/capability/types/keys.go @@ -39,7 +39,7 @@ func RevCapabilityKey(module, name string) []byte { // FwdCapabilityKey returns a forward lookup key for a given module and capability // reference. func FwdCapabilityKey(module string, cap *Capability) []byte { - return []byte(fmt.Sprintf("%s/fwd/%p", module, cap)) + return []byte(fmt.Sprintf("%s/fwd/%#016p", module, cap)) } // IndexToKey returns bytes to be used as a key for a given capability index. diff --git a/x/capability/types/keys_test.go b/x/capability/types/keys_test.go index e767c3d34222..1ac4702ba581 100644 --- a/x/capability/types/keys_test.go +++ b/x/capability/types/keys_test.go @@ -16,7 +16,7 @@ func TestRevCapabilityKey(t *testing.T) { func TestFwdCapabilityKey(t *testing.T) { cap := types.NewCapability(23) - expected := []byte(fmt.Sprintf("bank/fwd/%p", cap)) + expected := []byte(fmt.Sprintf("bank/fwd/%#016p", cap)) require.Equal(t, expected, types.FwdCapabilityKey("bank", cap)) }