From b081c0a5f8515aaf0f96a5d82a0d407468dd741e Mon Sep 17 00:00:00 2001 From: Sky Young Date: Fri, 8 Jun 2018 15:48:39 -0700 Subject: [PATCH] Only add tx to cache if it has at least 6 transactions --- lib/services/transaction/index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/services/transaction/index.js b/lib/services/transaction/index.js index 83bf40a5..0953853d 100644 --- a/lib/services/transaction/index.js +++ b/lib/services/transaction/index.js @@ -130,7 +130,7 @@ TransactionService.prototype.getTransaction = function(txid, options, callback) if (err) { return callback(err); } - if (tx) { + if (tx && tx.confirmations >= 6) { self._cacheTx.set(txid, tx); } callback(err, tx); diff --git a/package.json b/package.json index 7e694478..2a828f0a 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "node": ">=8.0.0" }, "author": "BitPay ", - "version": "5.0.0-beta.67", + "version": "5.0.0-beta.68", "main": "./index.js", "repository": "git://github.com/oipwg/flocore-node.git", "homepage": "https://github.com/oipwg/flocore-node",