Skip to content

Commit

Permalink
bridge is always inactive if there is no guardian
Browse files Browse the repository at this point in the history
  • Loading branch information
tkxkd0159 committed May 7, 2024
1 parent 0d21ba2 commit 26fe40d
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions x/fbridge/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,16 @@ func (k Keeper) GetRoleMetadata(ctx sdk.Context) types.RoleMetadata {

func (k Keeper) GetBridgeStatus(ctx sdk.Context) types.BridgeStatus {
roleMeta := k.GetRoleMetadata(ctx)
bsMeta := k.GetBridgeStatusMetadata(ctx)
if types.CheckTrustLevelThreshold(roleMeta.Guardian, bsMeta.Inactive, k.GetParams(ctx).GuardianTrustLevel) {
return types.StatusInactive
if roleMeta.Guardian != 0 {
bsMeta := k.GetBridgeStatusMetadata(ctx)
if types.CheckTrustLevelThreshold(roleMeta.Guardian, bsMeta.Inactive, k.GetParams(ctx).GuardianTrustLevel) {
return types.StatusInactive
}

return types.StatusActive
}

return types.StatusActive
return types.StatusInactive
}

func (k Keeper) setBridgeInactiveCounter(ctx sdk.Context, nInactive uint64) {
Expand Down

0 comments on commit 26fe40d

Please sign in to comment.