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:
andrew.shvv
2016-10-16 03:02:09 +04:00
committed by Olaoluwa Osuntokun
parent e038491f8a
commit e515710a7d
13 changed files with 77 additions and 76 deletions

View File

@@ -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
}