chainntnfs: add unique ID field to track conf ntfns within notifier
This commit is contained in:
1 parent
ad904ebe8c
commit
c43506dee9
4 files changed
+15
-5
No files matched your search
@@ -54,6 +54,7 @@ type chainUpdate struct {
|
||||
// chain client. Multiple concurrent clients are supported. All notifications
|
||||
// are achieved via non-blocking sends on client channels.
|
||||
type BitcoindNotifier struct {
|
||||
confClientCounter uint64 // To be used atomically.
|
||||
spendClientCounter uint64 // To be used atomically.
|
||||
epochClientCounter uint64 // To be used atomically.
|
||||
|
||||
@@ -716,6 +717,7 @@ func (b *BitcoindNotifier) RegisterConfirmationsNtfn(txid *chainhash.Hash,
|
||||
|
||||
ntfn := &confirmationNotification{
|
||||
ConfNtfn: chainntnfs.ConfNtfn{
|
||||
ConfID: atomic.AddUint64(&b.confClientCounter, 1),
|
||||
TxID: txid,
|
||||
NumConfirmations: numConfs,
|
||||
Event: chainntnfs.NewConfirmationEvent(numConfs),
|
||||
|
||||
Reference in new issue
Block a user