chainntnfs interface: add mempool argument to RegisterSpendNtfn

This commit is contained in:
Johan T. Halseth 2018-03-29 15:26:33 +02:00
parent 6fa93a78c1
commit fa29adf9a3
No known key found for this signature in database
GPG Key ID: 15BAADA29DA20D26

@ -36,19 +36,22 @@ type ChainNotifier interface {
heightHint uint32) (*ConfirmationEvent, error)
// RegisterSpendNtfn registers an intent to be notified once the target
// outpoint is successfully 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.
// The heightHint parameter is provided as a convenience to light
// clients. The heightHint denotes the earliest height in the blockchain
// in which the target output could have been created.
// outpoint is successfully spent within a transaction. The returned
// SpendEvent will receive a send on the 'Spend' transaction once a
// transaction spending the input is detected on the blockchain. The
// heightHint parameter is provided as a convenience to light clients.
// The heightHint denotes the earliest height in the blockchain in
// which the target output could have been created.
//
// NOTE: This notifications should be triggered once the transaction is
// *seen* on the network, not when it has received a single confirmation.
// NOTE: If mempool=true is set, then this notification should be
// triggered on a best-effort basis once the transaction is *seen* on
// the network. If mempool=false, it should only be triggered when the
// spending transaction receives a single confirmation.
//
// NOTE: Dispatching notifications to multiple clients subscribed to a
// spend of the same outpoint MUST be supported.
RegisterSpendNtfn(outpoint *wire.OutPoint, heightHint uint32) (*SpendEvent, error)
RegisterSpendNtfn(outpoint *wire.OutPoint, heightHint uint32,
mempool bool) (*SpendEvent, error)
// RegisterBlockEpochNtfn registers an intent to be notified of each
// new block connected to the tip of the main chain. The returned