chainntnfs+queue: move ConcurrentQueue to own package 'queue'
This commit is contained in:
6 files changed
+22
-19
No files matched your search
@@ -14,6 +14,7 @@ import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/btcsuite/btcutil"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/queue"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -81,8 +82,8 @@ type BtcdNotifier struct {
|
||||
|
||||
bestBlock chainntnfs.BlockEpoch
|
||||
|
||||
chainUpdates *chainntnfs.ConcurrentQueue
|
||||
txUpdates *chainntnfs.ConcurrentQueue
|
||||
chainUpdates *queue.ConcurrentQueue
|
||||
txUpdates *queue.ConcurrentQueue
|
||||
|
||||
// spendHintCache is a cache used to query and update the latest height
|
||||
// hints for an outpoint. Each height hint represents the earliest
|
||||
@@ -115,8 +116,8 @@ func New(config *rpcclient.ConnConfig, spendHintCache chainntnfs.SpendHintCache,
|
||||
|
||||
spendNotifications: make(map[wire.OutPoint]map[uint64]*spendNotification),
|
||||
|
||||
chainUpdates: chainntnfs.NewConcurrentQueue(10),
|
||||
txUpdates: chainntnfs.NewConcurrentQueue(10),
|
||||
chainUpdates: queue.NewConcurrentQueue(10),
|
||||
txUpdates: queue.NewConcurrentQueue(10),
|
||||
|
||||
spendHintCache: spendHintCache,
|
||||
confirmHintCache: confirmHintCache,
|
||||
@@ -1056,7 +1057,7 @@ type blockEpochRegistration struct {
|
||||
|
||||
epochChan chan *chainntnfs.BlockEpoch
|
||||
|
||||
epochQueue *chainntnfs.ConcurrentQueue
|
||||
epochQueue *queue.ConcurrentQueue
|
||||
|
||||
bestBlock *chainntnfs.BlockEpoch
|
||||
|
||||
@@ -1081,7 +1082,7 @@ func (b *BtcdNotifier) RegisterBlockEpochNtfn(
|
||||
bestBlock *chainntnfs.BlockEpoch) (*chainntnfs.BlockEpochEvent, error) {
|
||||
|
||||
reg := &blockEpochRegistration{
|
||||
epochQueue: chainntnfs.NewConcurrentQueue(20),
|
||||
epochQueue: queue.NewConcurrentQueue(20),
|
||||
epochChan: make(chan *chainntnfs.BlockEpoch, 20),
|
||||
cancelChan: make(chan struct{}),
|
||||
epochID: atomic.AddUint64(&b.epochClientCounter, 1),
|
||||
|
||||
Reference in new issue
Block a user