Transaction: adds assert for invalid value type

This commit is contained in:
Daniel Cousens 2014-07-16 17:53:38 +10:00
parent 5cbb4af7b4
commit c2e7840c4f

View file

@ -85,6 +85,7 @@ Transaction.prototype.addOutput = function(scriptPubKey, value) {
}
assert(scriptPubKey instanceof Script, 'Expected Address or Script, got ' + scriptPubKey)
assert.equal(typeof value, 'number', 'Expected number value, got ' + value)
return (this.outs.push({
script: scriptPubKey,