mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-25 19:01:17 +02:00
multi: use witnessScript everywhere instead of redeemScript
This commit consists of a mass variable renaming to call the pkScript being executed for segwit outputs the `witnessScript` instead of `redeemScript`. The latter naming convention is generally considered to be reserved for the context of BIP 16 execution. With segwit to be deployed soon, we should be using the correct terminology uniformly through the codebase. In addition some minor typos throughout the codebase has been fixed.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
e038491f8a
commit
e515710a7d
@@ -127,7 +127,7 @@ type OpenChannel struct {
|
||||
|
||||
OurMultiSigKey *btcec.PublicKey
|
||||
TheirMultiSigKey *btcec.PublicKey
|
||||
FundingRedeemScript []byte
|
||||
FundingWitnessScript []byte
|
||||
|
||||
// In blocks
|
||||
LocalCsvDelay uint32
|
||||
@@ -1095,7 +1095,7 @@ func putChanFundingInfo(nodeChanBucket *bolt.Bucket, channel *OpenChannel) error
|
||||
return err
|
||||
}
|
||||
|
||||
if err := wire.WriteVarBytes(&b, 0, channel.FundingRedeemScript[:]); err != nil {
|
||||
if err := wire.WriteVarBytes(&b, 0, channel.FundingWitnessScript[:]); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -1151,7 +1151,7 @@ func fetchChanFundingInfo(nodeChanBucket *bolt.Bucket, channel *OpenChannel) err
|
||||
return err
|
||||
}
|
||||
|
||||
channel.FundingRedeemScript, err = wire.ReadVarBytes(infoBytes, 0, 520, "")
|
||||
channel.FundingWitnessScript, err = wire.ReadVarBytes(infoBytes, 0, 520, "")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user