TxBuilder: add explanation for prevOutScript branch

This commit is contained in:
Daniel Cousens 2015-02-04 21:10:33 +11:00
parent b55e3a0245
commit e33a6409d3

View file

@ -302,6 +302,7 @@ TransactionBuilder.prototype.sign = function(index, privKey, redeemScript, hashT
// initialize it
} else {
if (redeemScript) {
// if we have a prevOutScript, enforce scriptHash equality to the redeemScript
if (input.prevOutScript) {
assert.equal(input.prevOutType, 'scripthash', 'PrevOutScript must be P2SH')