Skip to content

Commit

Permalink
Merge pull request #1047 from eordano/fix/inspect
Browse files Browse the repository at this point in the history
Fix inspect method so it doesn't fail on incomplete TX
  • Loading branch information
yemel committed Feb 6, 2015
2 parents 9a7097a + 6716479 commit 5f5be61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/transaction/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ Transaction.prototype.serialize = function(unsafe) {
}
};

Transaction.prototype.uncheckedSerialize = Transaction.prototype.toString = function() {
Transaction.prototype.uncheckedSerialize = function() {
return this.toBuffer().toString('hex');
};

Expand Down Expand Up @@ -161,7 +161,7 @@ Transaction.prototype._hasDustOutputs = function() {
};

Transaction.prototype.inspect = function() {
return '<Transaction: ' + this.toString() + '>';
return '<Transaction: ' + this.uncheckedSerialize() + '>';
};

Transaction.prototype.toBuffer = function() {
Expand Down

0 comments on commit 5f5be61

Please sign in to comment.