Skip to content

Commit

Permalink
fix: lint
Browse files Browse the repository at this point in the history
  • Loading branch information
RafilxTenfen authored and KonradStaniec committed Dec 3, 2024
1 parent da1ed05 commit 9a0b226
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions x/btccheckpoint/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,19 +140,19 @@ func (submission *SubmissionBtcInfo) SubmissionDepth() uint32 {
return submission.YoungestBlockDepth
}

func (newSubmission *SubmissionBtcInfo) IsBetterThan(currentBestSubmission *SubmissionBtcInfo) bool {
if newSubmission.SubmissionDepth() > currentBestSubmission.SubmissionDepth() {
func (submission *SubmissionBtcInfo) IsBetterThan(currentBestSubmission *SubmissionBtcInfo) bool {
if submission.SubmissionDepth() > currentBestSubmission.SubmissionDepth() {
return true
}

if newSubmission.SubmissionDepth() < currentBestSubmission.SubmissionDepth() {
if submission.SubmissionDepth() < currentBestSubmission.SubmissionDepth() {
return false
}

// at this point we know that both submissions youngest part happens to be in
// the same block. To resolve the tie we need to take into account index of
// latest transaction of the submissions
return newSubmission.YoungestBlockLowestTxIdx < currentBestSubmission.YoungestBlockLowestTxIdx
return submission.YoungestBlockLowestTxIdx < currentBestSubmission.YoungestBlockLowestTxIdx
}

func NewTransactionInfo(txKey *TransactionKey, txBytes []byte, proof []byte) *TransactionInfo {
Expand Down

0 comments on commit 9a0b226

Please sign in to comment.