Skip to content

Commit

Permalink
update challengers => challenger
Browse files Browse the repository at this point in the history
  • Loading branch information
beer-1 committed Sep 25, 2024
1 parent 5eeb6e3 commit cff2634
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion x/ophost/keeper/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion x/ophost/keeper/msg_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion x/ophost/types/hook/bridge_hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions x/ophost/types/hook/bridge_hook_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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,
})
Expand Down
6 changes: 3 additions & 3 deletions x/ophost/types/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type BridgeHook interface {
bridgeId uint64,
bridgeConfig BridgeConfig,
) error
BridgeChallengersUpdated(
BridgeChallengerUpdated(
ctx context.Context,
bridgeId uint64,
bridgeConfig BridgeConfig,
Expand Down Expand Up @@ -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 {

Check warning on line 61 in x/ophost/types/hooks.go

View check run for this annotation

Codecov / codecov/patch

x/ophost/types/hooks.go#L61

Added line #L61 was not covered by tests
return err
}
}
Expand Down

0 comments on commit cff2634

Please sign in to comment.