Transaction: add isCoinbaseHash static method
This commit is contained in:
parent
f13650544b
commit
49345748bb
2 changed files with 7 additions and 7 deletions
|
@ -85,6 +85,12 @@ Transaction.fromHex = function(hex) {
|
|||
return Transaction.fromBuffer(new Buffer(hex, 'hex'))
|
||||
}
|
||||
|
||||
Transaction.isCoinbaseHash = function(buffer) {
|
||||
return Array.prototype.every.call(buffer, function(x) {
|
||||
return x === 0
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new txIn.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue