From 5d79b094d47d52ec8873124b108d9050f8fb81b9 Mon Sep 17 00:00:00 2001 From: Wei Lu Date: Sun, 23 Mar 2014 20:16:27 +0800 Subject: [PATCH] remove processOutput and processExistingOutput instead of processOutput, use processTx instead processExistingOutput is time based which is not reliable --- src/wallet.js | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/wallet.js b/src/wallet.js index 484700f..1885e00 100644 --- a/src/wallet.js +++ b/src/wallet.js @@ -164,28 +164,6 @@ var Wallet = function (seed, options) { }) } - // Processes an output from an external source of the form - // { output: txhash:index, value: integer, address: address } - // Excellent compatibility with SX and pybitcointools - this.processOutput = function(o) { - if (!this.outputs[o.output] || this.outputs[o.output].pending) - this.outputs[o.output] = o; - } - - this.processExistingOutputs = function() { - var t = new Date().getTime() / 1000 - for (var o in this.outputs) { - if (o.pending && t > o.timestamp + 1200) - delete this.outputs[o] - if (o.spendpending && t > o.timestamp + 1200) { - o.spendpending = false - o.spend = false - delete o.timestamp - } - } - } - var peoInterval = setInterval(this.processExistingOutputs, 10000) - this.getUtxoToPay = function(value) { var h = [] for (var out in this.outputs) h.push(this.outputs[out])