chainntfs: further specify behavior of RegisterSpendNtfn

This commit updates the documentation for the chainntfs interface to
specify that notifications for spends registered with
`RegisterSpendNtfn` should be triggered *only* once a transaction
spending the target outpoint is *seen* within the network.

This strictness is required in order to allow an ‘honest’ counter-party
to properly sweep funds within channels with short delays.
This commit is contained in:
Olaoluwa Osuntokun 2016-06-20 21:27:38 -07:00
parent 3f0173f19a
commit 1879c00c55
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -22,6 +22,9 @@ type ChainNotifier interface {
// outpoint is succesfully spent within a confirmed transaction. The
// returned SpendEvent will receive a send on the 'Spend' transaction
// once a transaction spending the input is detected on the blockchain.
//
// NOTE: This notifications should be triggered once the transaction is
// *seen* on the network, not when it has received a single confirmation.
RegisterSpendNtfn(outpoint *wire.OutPoint) (*SpendEvent, error)
// Start the ChainNotifier. Once started, the implementation should be