Skip to content

Commit

Permalink
fix: remove else so that if previous if blocks don't skip necessary…
Browse files Browse the repository at this point in the history
… checks
  • Loading branch information
PudgyPug committed Jan 5, 2025
1 parent 500e732 commit 822ffcf
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/state-manager/TransactionQueue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ class TransactionQueue {
isSenderValid = this.validateCorrespondingTellSender(queueEntry, state.accountId, senderNodeId)
}

if (this.stateManager.testFailChance(configContext.debug.ignoreDataTellChance,
if (this.stateManager.testFailChance(configContext.debug.ignoreDataTellChance,
'ignoreDataTellChance', queueEntry.logID, '', logFlags.verbose ) === true ) {
isSenderValid = false
}
Expand Down Expand Up @@ -5372,15 +5372,15 @@ class TransactionQueue {
delete queueEntry.recievedAppliedReceipt2
delete queueEntry.appliedReceiptForRepair2

queueEntry.signedReceipt =
queueEntry.signedReceipt =
queueEntry.signedReceipt ??
queueEntry.receivedSignedReceipt ??
queueEntry.signedReceiptForRepair ??
queueEntry.signedReceiptFinal
queueEntry.receivedSignedReceipt = null
queueEntry.signedReceiptForRepair = null
queueEntry.signedReceiptFinal = queueEntry.signedReceipt

delete queueEntry.receivedSignedReceipt
delete queueEntry.signedReceiptForRepair

Expand Down Expand Up @@ -5983,7 +5983,8 @@ class TransactionQueue {
' commit the tx')
continue
}
} else if (txAge > timeM3 + configContext.stateManager.voteSeenExpirationTime && hasSeenVote && !hasSeenConfirmation) {
}
if (txAge > timeM3 + configContext.stateManager.voteSeenExpirationTime && hasSeenVote && !hasSeenConfirmation) {
if (configContext.stateManager.disableTxExpiration === false) {
nestedCountersInstance.countEvent('txExpired', `> timeM3 + voteSeenExpirationTime`)
this.mainLogger.error(`${queueEntry.logID} txAge > timeM3 + voteSeenExpirationTime general case has vote but fail to generate receipt`)
Expand All @@ -5992,7 +5993,8 @@ class TransactionQueue {
' commit the tx')
continue
}
} else if (txAge > timeM3 + configContext.stateManager.noVoteSeenExpirationTime && !hasSeenVote) {
}
if (txAge > timeM3 + configContext.stateManager.noVoteSeenExpirationTime && !hasSeenVote) {
// seen no vote but past timeM3 + noVoteSeenExpirationTime
// nestedCountersInstance.countEvent('txExpired', `> timeM3 + noVoteSeenExpirationTime`)
// this.mainLogger.error(`${queueEntry.logID} txAge > timeM3 + noVoteSeenExpirationTime general case. no vote seen`)
Expand Down Expand Up @@ -7798,7 +7800,7 @@ class TransactionQueue {
}
if (successCount === accountIds.length && validAppReceiptData === true) {
success = true

//setting this for completeness. if our node is awaiting final data it will utilize what was looked up here
queueEntry.hasValidFinalData = true
return { wrappedResponses: queueEntry.collectedFinalData, appReceiptData: response.appReceiptData }
Expand Down

0 comments on commit 822ffcf

Please sign in to comment.