Merge pull request #307 from braydonf/bug/outputIndex

Fix bug where the outputIndex would be removed.
This commit is contained in:
Patrick Nagurny 2015-10-13 11:23:29 -04:00
commit 4885ce949c
1 changed files with 2 additions and 4 deletions

View File

@ -870,8 +870,7 @@ AddressService.prototype.getInputs = function(addressStr, options, callback) {
var mempoolInputs = self.mempoolInputIndex[addressStr];
if (mempoolInputs) {
for(var i = 0; i < mempoolInputs.length; i++) {
// TODO copy
var newInput = mempoolInputs[i];
var newInput = _.clone(mempoolInputs[i]);
newInput.address = addressStr;
newInput.height = -1;
newInput.confirmations = 0;
@ -984,8 +983,7 @@ AddressService.prototype.getOutputs = function(addressStr, options, callback) {
var mempoolOutputs = self.mempoolOutputIndex[addressStr];
if (mempoolOutputs) {
for(var i = 0; i < mempoolOutputs.length; i++) {
// TODO copy
var newOutput = mempoolOutputs[i];
var newOutput = _.clone(mempoolOutputs[i]);
newOutput.address = addressStr;
newOutput.height = -1;
newOutput.confirmations = 0;