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