rename unspent.
This commit is contained in:
parent
220b09bc67
commit
f5a63563e3
@ -61,7 +61,7 @@ function TX(data, block) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this._unspent = data._unspent || null;
|
this.unspent = data.unspent || null;
|
||||||
this.hardFee = data.hardFee || null;
|
this.hardFee = data.hardFee || null;
|
||||||
this.changeAddress = data.changeAddress || null;
|
this.changeAddress = data.changeAddress || null;
|
||||||
this.changeIndex = data.changeIndex != null ? data.changeIndex : -1;
|
this.changeIndex = data.changeIndex != null ? data.changeIndex : -1;
|
||||||
@ -949,7 +949,7 @@ TX.prototype.fillUnspent = function fillUnspent(unspent, address, fee) {
|
|||||||
var result;
|
var result;
|
||||||
|
|
||||||
if (unspent)
|
if (unspent)
|
||||||
this._unspent = unspent;
|
this.unspent = unspent;
|
||||||
|
|
||||||
if (address)
|
if (address)
|
||||||
this.changeAddress = address;
|
this.changeAddress = address;
|
||||||
@ -959,7 +959,7 @@ TX.prototype.fillUnspent = function fillUnspent(unspent, address, fee) {
|
|||||||
|
|
||||||
assert(this.changeAddress);
|
assert(this.changeAddress);
|
||||||
|
|
||||||
result = this.getUnspent(this._unspent, this.changeAddress, this.hardFee);
|
result = this.getUnspent(this.unspent, this.changeAddress, this.hardFee);
|
||||||
|
|
||||||
if (!result.inputs)
|
if (!result.inputs)
|
||||||
return result;
|
return result;
|
||||||
@ -1372,7 +1372,7 @@ TX.prototype.inspect = function inspect() {
|
|||||||
copy.block = this.block;
|
copy.block = this.block;
|
||||||
delete copy._raw;
|
delete copy._raw;
|
||||||
delete copy._chain;
|
delete copy._chain;
|
||||||
delete copy._unspent;
|
delete copy.unspent;
|
||||||
copy.hash = this.hash('hex');
|
copy.hash = this.hash('hex');
|
||||||
copy.rhash = this.rhash;
|
copy.rhash = this.rhash;
|
||||||
copy.rblock = this.rblock;
|
copy.rblock = this.rblock;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user