Skip to content

Commit

Permalink
bridge is always active 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 86e8792
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions x/fbridge/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,11 @@ 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
Expand Down

0 comments on commit 86e8792

Please sign in to comment.