mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-20 04:21:37 +02:00
chainntnfs: add unique ID field to track conf ntfns within notifier
This commit is contained in:
@@ -48,12 +48,13 @@ var (
|
||||
// TODO(roasbeef): heavily consolidate with NeutrinoNotifier code
|
||||
// * maybe combine into single package?
|
||||
type NeutrinoNotifier struct {
|
||||
started int32 // To be used atomically.
|
||||
stopped int32 // To be used atomically.
|
||||
|
||||
confClientCounter uint64 // To be used atomically.
|
||||
spendClientCounter uint64 // To be used atomically.
|
||||
epochClientCounter uint64 // To be used atomically.
|
||||
|
||||
started int32 // To be used atomically.
|
||||
stopped int32 // To be used atomically.
|
||||
|
||||
heightMtx sync.RWMutex
|
||||
bestHeight uint32
|
||||
|
||||
@@ -696,6 +697,7 @@ func (n *NeutrinoNotifier) RegisterConfirmationsNtfn(txid *chainhash.Hash,
|
||||
|
||||
ntfn := &confirmationsNotification{
|
||||
ConfNtfn: chainntnfs.ConfNtfn{
|
||||
ConfID: atomic.AddUint64(&n.confClientCounter, 1),
|
||||
TxID: txid,
|
||||
NumConfirmations: numConfs,
|
||||
Event: chainntnfs.NewConfirmationEvent(numConfs),
|
||||
|
Reference in New Issue
Block a user