input+sweep: rework witness type into an interface

This commit is contained in:
Oliver Gugger committed 2019-10-14 15:32:54 +02:00
1 parent 8e4a897a60
commit fb0051a318
5 files changed
+196 -144

No files matched your search

+1 -3
View File
@@ -114,9 +114,7 @@ func NewBaseInput(outpoint *wire.OutPoint, witnessType WitnessType,
func (bi *BaseInput) CraftInputScript(signer Signer, txn *wire.MsgTx,
hashCache *txscript.TxSigHashes, txinIdx int) (*Script, error) {
witnessFunc := bi.witnessType.GenWitnessFunc(
signer, bi.SignDesc(),
)
witnessFunc := bi.witnessType.WitnessGenerator(signer, bi.SignDesc())
return witnessFunc(txn, hashCache, txinIdx)
}