input+sweep: rework witness type into an interface
This commit is contained in:
5 files changed
+196
-144
No files matched your search
+1
-3
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user