mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-28 01:32:27 +02:00
lnwallet: import tadge's p2shify func
This commit is contained in:
parent
e2c4ccbe28
commit
ddb74258ff
@ -14,6 +14,14 @@ type LightningChannel struct {
|
|||||||
wallet *LightningWallet
|
wallet *LightningWallet
|
||||||
|
|
||||||
channelEvents *chainntnfs.ChainNotifier
|
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
|
sync.RWMutex
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user