Skip to content

Commit 60bebda

Browse files
committed
check tx.result validity first
1 parent a836c1c commit 60bebda

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

libs/paymentProcessor.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,15 @@ function SetupForPool(logger, poolOptions, setupFinished) {
234234
round.category = 'kicked';
235235
return;
236236
}
237-
else if (!tx.result.details || (tx.result.details && tx.result.details.length === 0)) {
238-
logger.warning(logSystem, logComponent, 'Daemon reports no details for transaction: ' + round.txHash);
239-
round.category = 'kicked';
240-
return;
241-
}
242237
else if (tx.error || !tx.result) {
243238
logger.error(logSystem, logComponent, 'Odd error with gettransaction ' + round.txHash + ' '
244239
+ JSON.stringify(tx));
240+
round.category = 'kicked';
241+
return;
242+
}
243+
else if (!tx.result.details || (tx.result.details && tx.result.details.length === 0)) {
244+
logger.warning(logSystem, logComponent, 'Daemon reports no details for transaction: ' + round.txHash);
245+
round.category = 'kicked';
245246
return;
246247
}
247248

0 commit comments

Comments
 (0)