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:
parent
3f0173f19a
commit
1879c00c55
@ -22,6 +22,9 @@ type ChainNotifier interface {
|
|||||||
// outpoint is succesfully spent within a confirmed transaction. The
|
// outpoint is succesfully spent within a confirmed transaction. The
|
||||||
// returned SpendEvent will receive a send on the 'Spend' transaction
|
// returned SpendEvent will receive a send on the 'Spend' transaction
|
||||||
// once a transaction spending the input is detected on the blockchain.
|
// 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)
|
RegisterSpendNtfn(outpoint *wire.OutPoint) (*SpendEvent, error)
|
||||||
|
|
||||||
// Start the ChainNotifier. Once started, the implementation should be
|
// Start the ChainNotifier. Once started, the implementation should be
|
||||||
|
Loading…
Reference in New Issue
Block a user