diff --git a/x/ophost/keeper/common_test.go b/x/ophost/keeper/common_test.go index a1cf4a1..18d36c2 100644 --- a/x/ophost/keeper/common_test.go +++ b/x/ophost/keeper/common_test.go @@ -342,7 +342,7 @@ func (h *bridgeHook) BridgeCreated( return nil } -func (h *bridgeHook) BridgeChallengersUpdated( +func (h *bridgeHook) BridgeChallengerUpdated( ctx context.Context, bridgeId uint64, bridgeConfig ophosttypes.BridgeConfig, diff --git a/x/ophost/keeper/msg_server.go b/x/ophost/keeper/msg_server.go index 8b67af8..3f67d64 100644 --- a/x/ophost/keeper/msg_server.go +++ b/x/ophost/keeper/msg_server.go @@ -409,7 +409,7 @@ func (ms MsgServer) UpdateChallenger(ctx context.Context, req *types.MsgUpdateCh } config.Challenger = req.Challenger - if err := ms.Keeper.bridgeHook.BridgeChallengersUpdated(ctx, bridgeId, config); err != nil { + if err := ms.Keeper.bridgeHook.BridgeChallengerUpdated(ctx, bridgeId, config); err != nil { return nil, err } diff --git a/x/ophost/types/hook/bridge_hook.go b/x/ophost/types/hook/bridge_hook.go index 967de73..3183ced 100644 --- a/x/ophost/types/hook/bridge_hook.go +++ b/x/ophost/types/hook/bridge_hook.go @@ -62,7 +62,7 @@ func (h BridgeHook) BridgeCreated( return nil } -func (h BridgeHook) BridgeChallengersUpdated( +func (h BridgeHook) BridgeChallengerUpdated( ctx context.Context, bridgeId uint64, bridgeConfig ophosttypes.BridgeConfig, diff --git a/x/ophost/types/hook/bridge_hook_test.go b/x/ophost/types/hook/bridge_hook_test.go index 8f05794..8eb31e8 100644 --- a/x/ophost/types/hook/bridge_hook_test.go +++ b/x/ophost/types/hook/bridge_hook_test.go @@ -157,7 +157,7 @@ func Test_BridgeHook_BridgeCreated(t *testing.T) { require.False(t, ok) } -func Test_BridgeHook_ChallengersUpdated(t *testing.T) { +func Test_BridgeHook_ChallengerUpdated(t *testing.T) { ctx, h := setup() metadata, err := json.Marshal(hook.PermsMetadata{ @@ -178,7 +178,7 @@ func Test_BridgeHook_ChallengersUpdated(t *testing.T) { require.NoError(t, err) newAddr := acc_addr() - err = h.BridgeChallengersUpdated(ctx, 1, ophosttypes.BridgeConfig{ + err = h.BridgeChallengerUpdated(ctx, 1, ophosttypes.BridgeConfig{ Challenger: newAddr[0].String(), Metadata: metadata, }) diff --git a/x/ophost/types/hooks.go b/x/ophost/types/hooks.go index d774b93..17e84b0 100644 --- a/x/ophost/types/hooks.go +++ b/x/ophost/types/hooks.go @@ -8,7 +8,7 @@ type BridgeHook interface { bridgeId uint64, bridgeConfig BridgeConfig, ) error - BridgeChallengersUpdated( + BridgeChallengerUpdated( ctx context.Context, bridgeId uint64, bridgeConfig BridgeConfig, @@ -52,13 +52,13 @@ func (hooks BridgeHooks) BridgeCreated( return nil } -func (hooks BridgeHooks) BridgeChallengersUpdated( +func (hooks BridgeHooks) BridgeChallengerUpdated( ctx context.Context, bridgeId uint64, bridgeConfig BridgeConfig, ) error { for _, h := range hooks { - if err := h.BridgeChallengersUpdated(ctx, bridgeId, bridgeConfig); err != nil { + if err := h.BridgeChallengerUpdated(ctx, bridgeId, bridgeConfig); err != nil { return err } }