Skip to content

Commit f2e8beb

Browse files
committed
tapgarden: handle proof received from courier using subscription channel
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.
1 parent 41e22b9 commit f2e8beb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tapgarden/custodian.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -534,6 +534,11 @@ func (c *Custodian) receiveProof(addr *address.Tap, op wire.OutPoint) error {
534534
return fmt.Errorf("unable to import proofs: %w", err)
535535
}
536536

537+
// The proof is now verified and in our local archive. We will now
538+
// finalize handling the proof like we would with any other newly
539+
// received proof.
540+
c.proofSubscription.NewItemCreated.ChanIn() <- addrProof.Blob
541+
537542
return nil
538543
}
539544

0 commit comments

Comments
 (0)