chainntnfs: remove mempool option from RegisterSpendNtfn
This commit is contained in:
4 files changed
+14
-25
No files matched your search
@@ -416,10 +416,9 @@ out:
|
||||
rem := make(map[uint64]*spendNotification)
|
||||
for c, ntfn := range clients {
|
||||
// If this is a mempool spend,
|
||||
// and this client didn't want
|
||||
// to be notified on mempool
|
||||
// spends, store it for later.
|
||||
if !confirmedSpend && !ntfn.mempool {
|
||||
// store the client to wait for
|
||||
// a confirmed spend.
|
||||
if !confirmedSpend {
|
||||
rem[c] = ntfn
|
||||
continue
|
||||
}
|
||||
@@ -673,8 +672,6 @@ type spendNotification struct {
|
||||
|
||||
spendID uint64
|
||||
|
||||
mempool bool
|
||||
|
||||
heightHint uint32
|
||||
}
|
||||
|
||||
@@ -694,14 +691,13 @@ type spendCancel struct {
|
||||
// across the 'Spend' channel. The heightHint should represent the earliest
|
||||
// height in the chain where the transaction could have been spent in.
|
||||
func (b *BtcdNotifier) RegisterSpendNtfn(outpoint *wire.OutPoint,
|
||||
heightHint uint32, mempool bool) (*chainntnfs.SpendEvent, error) {
|
||||
heightHint uint32) (*chainntnfs.SpendEvent, error) {
|
||||
|
||||
ntfn := &spendNotification{
|
||||
targetOutpoint: outpoint,
|
||||
spendChan: make(chan *chainntnfs.SpendDetail, 1),
|
||||
spendID: atomic.AddUint64(&b.spendClientCounter, 1),
|
||||
heightHint: heightHint,
|
||||
mempool: mempool,
|
||||
}
|
||||
|
||||
select {
|
||||
|
||||
Reference in new issue
Block a user