Skip to content

Commit

Permalink
Merge pull request #600 from lightninglabs/fix-burn
Browse files Browse the repository at this point in the history
tapfreighter: don't attempt to send burns with courier
  • Loading branch information
guggero committed Oct 18, 2023
2 parents 1d5d5c0 + 076320f commit a3783b0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tapfreighter/chain_porter.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ func (p *ChainPorter) transferReceiverProof(pkg *sendPackage) error {
return nil
}

// Un-spendable means this is a tombstone output resulting from
// a split.
unSpendable, err := out.ScriptKey.IsUnSpendable()
if err != nil {
return fmt.Errorf("error checking if script key is "+
Expand All @@ -618,6 +620,17 @@ func (p *ChainPorter) transferReceiverProof(pkg *sendPackage) error {
return nil
}

// Burns are also always kept local and not sent to any
// receiver.
if len(out.WitnessData) > 0 && asset.IsBurnKey(
out.ScriptKey.PubKey, out.WitnessData[0],
) {

log.Debugf("Not transferring proof for burn script "+
"key %x", key.SerializeCompressed())
return nil
}

// We just look for the full proof in the list of final proofs
// by matching the content of the proof suffix.
var receiverProof *proof.AnnotatedProof
Expand Down

0 comments on commit a3783b0

Please sign in to comment.