From 54cb8a05cd5897c02128dbd42b4cc780b33a553c Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 7 Jun 2017 17:07:27 -0700 Subject: [PATCH] chainntnfs: fix vet error, don't pass lock by value --- chainntnfs/btcdnotify/btcd.go | 4 ++-- chainntnfs/neutrinonotify/neutrino.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/chainntnfs/btcdnotify/btcd.go b/chainntnfs/btcdnotify/btcd.go index 069d22e4a..8cb4cbb4c 100644 --- a/chainntnfs/btcdnotify/btcd.go +++ b/chainntnfs/btcdnotify/btcd.go @@ -497,7 +497,7 @@ func (b *BtcdNotifier) notifyBlockEpochs(newHeight int32, newSha *chainhash.Hash b.wg.Add(1) epochClient.wg.Add(1) go func(ntfnChan chan *chainntnfs.BlockEpoch, cancelChan chan struct{}, - clientWg sync.WaitGroup) { + clientWg *sync.WaitGroup) { defer clientWg.Done() defer b.wg.Done() @@ -512,7 +512,7 @@ func (b *BtcdNotifier) notifyBlockEpochs(newHeight int32, newSha *chainhash.Hash return } - }(epochClient.epochChan, epochClient.cancelChan, epochClient.wg) + }(epochClient.epochChan, epochClient.cancelChan, &epochClient.wg) } } diff --git a/chainntnfs/neutrinonotify/neutrino.go b/chainntnfs/neutrinonotify/neutrino.go index 13348d7e9..8f2cd628c 100644 --- a/chainntnfs/neutrinonotify/neutrino.go +++ b/chainntnfs/neutrinonotify/neutrino.go @@ -563,7 +563,7 @@ func (n *NeutrinoNotifier) notifyBlockEpochs(newHeight int32, newSha *chainhash. n.wg.Add(1) epochClient.wg.Add(1) go func(ntfnChan chan *chainntnfs.BlockEpoch, cancelChan chan struct{}, - clientWg sync.WaitGroup) { + clientWg *sync.WaitGroup) { defer clientWg.Done() defer n.wg.Done() @@ -577,7 +577,7 @@ func (n *NeutrinoNotifier) notifyBlockEpochs(newHeight int32, newSha *chainhash. case <-n.quit: return } - }(epochClient.epochChan, epochClient.cancelChan, epochClient.wg) + }(epochClient.epochChan, epochClient.cancelChan, &epochClient.wg) } }