From 5ce093739eea892ddff79ce33235c31f6fa0f95f Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Wed, 8 Jul 2015 15:38:45 +1000 Subject: [PATCH] TxBuilder: clarify comment about coin base script support --- src/transaction_builder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/transaction_builder.js b/src/transaction_builder.js index a96306d..7ddb6a6 100644 --- a/src/transaction_builder.js +++ b/src/transaction_builder.js @@ -110,8 +110,10 @@ TransactionBuilder.fromTransaction = function (transaction) { // Extract/add signatures txb.inputs = transaction.ins.map(function (txIn) { - // TODO: remove me after testcase added - assert(!Transaction.isCoinbaseHash(txIn.hash), 'coinbase inputs not supported') + // TODO: verify whether extractInput is sane with coinbase scripts + if (Transaction.isCoinbaseHash(txIn.hash)) { + throw new Error('coinbase inputs not supported') + } // Ignore empty scripts if (txIn.script.buffer.length === 0) return {}