Transaction: remove untested TransactionIn constructor params

This commit is contained in:
Daniel Cousens 2014-06-14 23:48:26 +10:00
parent 9b89a267ca
commit e49e1796d5

View file

@ -384,16 +384,9 @@ Transaction.prototype.estimateFee = function(feePerKb){
return feePerKb * Math.ceil(size / 1000)
}
var TransactionIn = function (data) {
if (typeof data == "string") {
this.outpoint = { hash: data.split(':')[0], index: data.split(':')[1] }
} else if (data.outpoint) {
this.outpoint = data.outpoint
} else {
this.outpoint = { hash: data.hash, index: data.index }
}
assert(data.script, 'Invalid TxIn parameters')
function TransactionIn(data) {
assert(data.outpoint && data.script, 'Invalid TxIn parameters')
this.outpoint = data.outpoint
this.script = data.script
this.sequence = data.sequence == undefined ? DEFAULT_SEQUENCE : data.sequence
}
@ -413,8 +406,6 @@ function TransactionOut(data) {
this.script = data.script
this.value = data.value
this.address = data.address
if (data.address) this.address = data.address
}
TransactionOut.prototype.clone = function() {