breacharbiter: update second level pkScript as well

In this commit, we update the convertToSecondLevelRevoke function to
also upgrade the second level pkScript as well. This is required as
we'll need to use this for a confirmation notification once we sweep the
output in the case that the remote party goes to the second layer.
This commit is contained in:
Olaoluwa Osuntokun 2018-07-17 19:26:53 -07:00
parent 53416260e3
commit 62ab7424af
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

View File

@ -298,6 +298,7 @@ func convertToSecondLevelRevoke(bo *breachedOutput, breachInfo *retributionInfo,
newAmt := spendingTx.TxOut[0].Value
bo.amt = btcutil.Amount(newAmt)
bo.signDesc.Output.Value = newAmt
bo.signDesc.Output.PkScript = spendingTx.TxOut[0].PkScript
// Finally, we'll need to adjust the witness program in the
// SignDescriptor.