Skip to content

Commit

Permalink
fix(staking): fix impossible conditions (#19621)
Browse files Browse the repository at this point in the history
(cherry picked from commit b118a0a)

# Conflicts:
#	x/staking/keeper/query_utils.go
  • Loading branch information
GAtom22 authored and mergify[bot] committed Mar 1, 2024
1 parent 7628592 commit 8325b02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion x/staking/keeper/delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ func (k Keeper) Unbond(
}

valAddr, err1 := k.validatorAddressCodec.StringToBytes(delegation.GetValidatorAddr())
if err != nil {
if err1 != nil {
return amount, err1
}

Expand Down
3 changes: 3 additions & 0 deletions x/staking/keeper/query_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,15 @@ func (k Keeper) GetDelegatorValidators(
validators[i] = validator
i++

<<<<<<< HEAD

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected statement, found '<<'

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expected }

Check failure on line 38 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected <<, expected }
return false, nil

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected return in argument list; possibly missing comma or )

Check failure on line 39 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected return in argument list; possibly missing comma or )
})

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected ) after top level declaration

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

syntax error: unexpected ) after top level declaration

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (01)

syntax error: unexpected ) after top level declaration

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (02)

syntax error: unexpected ) after top level declaration

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected ) after top level declaration

Check failure on line 40 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

syntax error: unexpected ) after top level declaration
if err != nil {
return types.Validators{}, err
}

=======

Check failure on line 45 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / dependency-review

expected statement, found '=='
>>>>>>> b118a0ada (fix(staking): fix impossible conditions (#19621))

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / dependency-review

illegal character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (03)

invalid character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (01)

invalid character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (02)

invalid character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'

Check failure on line 46 in x/staking/keeper/query_utils.go

View workflow job for this annotation

GitHub Actions / tests (00)

invalid character U+0023 '#'
return types.Validators{Validators: validators[:i], ValidatorCodec: k.validatorAddressCodec}, nil // trim
}

Expand Down

0 comments on commit 8325b02

Please sign in to comment.