From e210c1c8b0cdefb586ff10f097e4e29a41455b45 Mon Sep 17 00:00:00 2001 From: marbar3778 Date: Tue, 24 Dec 2024 17:22:20 +0100 Subject: [PATCH 1/2] avoid overwriting the error --- x/staking/keeper/delegation.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index fcb3faa6438f..92a0887180c4 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -858,8 +858,8 @@ func (k Keeper) getBeginInfo( return completionTime, height, false, nil } headerInfo := k.HeaderService.HeaderInfo(ctx) - unbondingTime, err := k.UnbondingTime(ctx) - if err != nil { + unbondingTime, err2 := k.UnbondingTime(ctx) + if err2 != nil { return completionTime, height, false, err } From 5884fc27cae4fc26a029fa76dad62e8e6abbad84 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 6 Jan 2025 10:44:39 +0100 Subject: [PATCH 2/2] Update x/staking/keeper/delegation.go --- x/staking/keeper/delegation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/staking/keeper/delegation.go b/x/staking/keeper/delegation.go index 92a0887180c4..4e0ed9268c18 100644 --- a/x/staking/keeper/delegation.go +++ b/x/staking/keeper/delegation.go @@ -860,7 +860,7 @@ func (k Keeper) getBeginInfo( headerInfo := k.HeaderService.HeaderInfo(ctx) unbondingTime, err2 := k.UnbondingTime(ctx) if err2 != nil { - return completionTime, height, false, err + return completionTime, height, false, errors.Join(err, err2) } // TODO: When would the validator not be found?