Skip to content

Commit

Permalink
tapgarden: handle proof received from courier using subscription channel
Browse files Browse the repository at this point in the history
This commit ensures that a proof received within a proof courier
goroutine is fed into the proof subscription channel and will be picked
up by the `handleNewProof` function. This ensures that any event
associated with the new proof will be cleaned up.
  • Loading branch information
ffranr committed Jan 5, 2024
1 parent 41e22b9 commit f2e8beb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tapgarden/custodian.go
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,11 @@ func (c *Custodian) receiveProof(addr *address.Tap, op wire.OutPoint) error {
return fmt.Errorf("unable to import proofs: %w", err)
}

// The proof is now verified and in our local archive. We will now
// finalize handling the proof like we would with any other newly
// received proof.
c.proofSubscription.NewItemCreated.ChanIn() <- addrProof.Blob

return nil
}

Expand Down

0 comments on commit f2e8beb

Please sign in to comment.