TxBuilder: clarify comment about coin base script support
This commit is contained in:
parent
a8f36ba515
commit
5ce093739e
1 changed files with 4 additions and 2 deletions
|
@ -110,8 +110,10 @@ TransactionBuilder.fromTransaction = function (transaction) {
|
||||||
|
|
||||||
// Extract/add signatures
|
// Extract/add signatures
|
||||||
txb.inputs = transaction.ins.map(function (txIn) {
|
txb.inputs = transaction.ins.map(function (txIn) {
|
||||||
// TODO: remove me after testcase added
|
// TODO: verify whether extractInput is sane with coinbase scripts
|
||||||
assert(!Transaction.isCoinbaseHash(txIn.hash), 'coinbase inputs not supported')
|
if (Transaction.isCoinbaseHash(txIn.hash)) {
|
||||||
|
throw new Error('coinbase inputs not supported')
|
||||||
|
}
|
||||||
|
|
||||||
// Ignore empty scripts
|
// Ignore empty scripts
|
||||||
if (txIn.script.buffer.length === 0) return {}
|
if (txIn.script.buffer.length === 0) return {}
|
||||||
|
|
Loading…
Add table
Reference in a new issue