lnwallet: import tadge's p2shify func
This commit is contained in:
parent
e2c4ccbe28
commit
ddb74258ff
@ -14,6 +14,14 @@ type LightningChannel struct {
|
||||
wallet *LightningWallet
|
||||
|
||||
channelEvents *chainntnfs.ChainNotifier
|
||||
// P2SHify...
|
||||
func P2SHify(scriptBytes []byte) ([]byte, error) {
|
||||
bldr := txscript.NewScriptBuilder()
|
||||
bldr.AddOp(txscript.OP_HASH160)
|
||||
bldr.AddData(btcutil.Hash160(scriptBytes))
|
||||
bldr.AddOp(txscript.OP_EQUAL)
|
||||
return bldr.Script()
|
||||
}
|
||||
|
||||
sync.RWMutex
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user