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 authored and Olaoluwa Osuntokun committed 2016-10-15 16:02:09 -07:00
1 parent e038491f8a
commit e515710a7d
13 files changed
+77 -76

No files matched your search

+3 -3
View File
@@ -481,14 +481,14 @@ func testDualFundingReservationWorkflow(miner *rpctest.Harness, wallet *lnwallet
chanInfo := lnc.StateSnapshot()
// Obtain bob's signature for the closure transaction.
redeemScript := lnc.FundingRedeemScript
witnessScript := lnc.FundingWitnessScript
fundingOut := lnc.ChannelPoint()
fundingTxIn := wire.NewTxIn(fundingOut, nil, nil)
bobCloseTx := lnwallet.CreateCooperativeCloseTx(fundingTxIn,
chanInfo.RemoteBalance, chanInfo.LocalBalance,
lnc.RemoteDeliveryScript, lnc.LocalDeliveryScript,
false)
bobSig, err := bobNode.signCommitTx(bobCloseTx, redeemScript, int64(lnc.Capacity))
bobSig, err := bobNode.signCommitTx(bobCloseTx, witnessScript, int64(lnc.Capacity))
if err != nil {
t.Fatalf("unable to generate bob's signature for closing tx: %v", err)
}
@@ -497,7 +497,7 @@ func testDualFundingReservationWorkflow(miner *rpctest.Harness, wallet *lnwallet
// be accepted, and found in the next mined block.
ourKey := chanReservation.OurContribution().MultiSigKey.SerializeCompressed()
theirKey := chanReservation.TheirContribution().MultiSigKey.SerializeCompressed()
witness := lnwallet.SpendMultiSig(redeemScript, ourKey, aliceCloseSig,
witness := lnwallet.SpendMultiSig(witnessScript, ourKey, aliceCloseSig,
theirKey, bobSig)
bobCloseTx.TxIn[0].Witness = witness
if err := wallet.PublishTransaction(bobCloseTx); err != nil {