Skip to content

Commit

Permalink
pr comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazar955 committed Oct 7, 2024
1 parent 530cb45 commit 0566ea0
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions btcstaking-tracker/stakingeventwatcher/tracked_delegations.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package stakingeventwatcher

import (
"fmt"
"reflect"
"sync"

"github.com/btcsuite/btcd/chaincfg/chainhash"
Expand Down Expand Up @@ -111,10 +110,8 @@ func (td *TrackedDelegations) HasDelegationChanged(
return false, false
}

// Compare fields to check if the delegation has changed
if existingDelegation.StakingOutputIdx != newDelegation.stakingOutputIdx ||
!reflect.DeepEqual(existingDelegation.UnbondingOutput, newDelegation.unbondingOutput) ||
existingDelegation.DelegationStartHeight != newDelegation.delegationStartHeight {
// Compare height to check if the delegation has changed
if existingDelegation.DelegationStartHeight != newDelegation.delegationStartHeight {
return true, true // The delegation has changed and it exists
}

Expand Down

0 comments on commit 0566ea0

Please sign in to comment.