chainntnfs+queue: move ConcurrentQueue to own package 'queue'

This commit is contained in:
Johan T. Halseth
2018-10-12 17:08:14 +02:00
parent d52e691d5f
commit dbf9b4ea4c
6 changed files with 22 additions and 19 deletions

View File

@@ -14,6 +14,7 @@ import (
"github.com/btcsuite/btcwallet/chain"
"github.com/btcsuite/btcwallet/wtxmgr"
"github.com/lightningnetwork/lnd/chainntnfs"
"github.com/lightningnetwork/lnd/queue"
)
const (
@@ -996,7 +997,7 @@ type blockEpochRegistration struct {
epochChan chan *chainntnfs.BlockEpoch
epochQueue *chainntnfs.ConcurrentQueue
epochQueue *queue.ConcurrentQueue
bestBlock *chainntnfs.BlockEpoch
@@ -1021,7 +1022,7 @@ func (b *BitcoindNotifier) 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),