From 9a0b226aa2d050fe8e8768edcb4268ce44cc5b37 Mon Sep 17 00:00:00 2001 From: RafilxTenfen Date: Wed, 20 Nov 2024 21:23:21 -0300 Subject: [PATCH] fix: lint --- x/btccheckpoint/types/types.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/btccheckpoint/types/types.go b/x/btccheckpoint/types/types.go index 7a55899d2..4c1c78fb8 100644 --- a/x/btccheckpoint/types/types.go +++ b/x/btccheckpoint/types/types.go @@ -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 {