From 8bd1df2bc75b691c0df0550d9942c8837c9daf7d Mon Sep 17 00:00:00 2001 From: Dan Janosik Date: Mon, 2 Jul 2018 15:06:35 -0400 Subject: [PATCH] armor --- app/api/coreApi.js | 7 ++++--- app/utils.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/api/coreApi.js b/app/api/coreApi.js index 0a54dba..b9cae80 100644 --- a/app/api/coreApi.js +++ b/app/api/coreApi.js @@ -305,10 +305,11 @@ function getRawTransactions(txids) { } else { var queriedTx = queriedTxs[queriedTxsCurrentIndex]; + if (queriedTx != null) { + combinedTxs.push(queriedTx); - combinedTxs.push(queriedTx); - - txCache.set("getRawTransaction-" + queriedTx.txid, queriedTx, 3600000); + txCache.set("getRawTransaction-" + queriedTx.txid, queriedTx, 3600000); + } queriedTxsCurrentIndex++; } diff --git a/app/utils.js b/app/utils.js index 24c745c..f2444c6 100644 --- a/app/utils.js +++ b/app/utils.js @@ -150,7 +150,7 @@ function seededRandomIntBetween(seed, min, max) { } function getMinerFromCoinbaseTx(tx) { - if (tx == null) { + if (tx == null || tx.vin == null || tx.vin.length == 0) { return null; }