Adding Transaction.prototype.isCoinbase

This commit is contained in:
Karel Bilek 2016-04-07 15:52:39 +02:00 committed by Daniel Cousens
parent 8a59fc1b3b
commit f958dd1e86

View file

@ -87,6 +87,10 @@ Transaction.isCoinbaseHash = function (buffer) {
})
}
Transaction.prototype.isCoinbase = function () {
return this.ins.length === 1 && Transaction.isCoinbaseHash(this.ins[0].hash)
}
var EMPTY_SCRIPT = new Buffer(0)
Transaction.prototype.addInput = function (hash, index, sequence, scriptSig) {