lnwallet: make BlockChainIO.GetUTXO take cancel chan
Use quit channels as cancel chan for call to GetUTXO.
This commit is contained in:
8 files changed
+12
-8
No files matched your search
@@ -181,7 +181,8 @@ func (m *mockChain) addUtxo(op wire.OutPoint, out *wire.TxOut) {
|
||||
m.utxos[op] = *out
|
||||
m.Unlock()
|
||||
}
|
||||
func (m *mockChain) GetUtxo(op *wire.OutPoint, _ []byte, _ uint32) (*wire.TxOut, error) {
|
||||
func (m *mockChain) GetUtxo(op *wire.OutPoint, _ []byte, _ uint32,
|
||||
_ <-chan struct{}) (*wire.TxOut, error) {
|
||||
m.RLock()
|
||||
defer m.RUnlock()
|
||||
|
||||
|
||||
@@ -1113,6 +1113,7 @@ func (r *ChannelRouter) processUpdate(msg interface{}) error {
|
||||
// been closed so we'll ignore it.
|
||||
chanUtxo, err := r.cfg.Chain.GetUtxo(
|
||||
fundingPoint, fundingPkScript, channelID.BlockHeight,
|
||||
r.quit,
|
||||
)
|
||||
if err != nil {
|
||||
r.rejectMtx.Lock()
|
||||
|
||||
Reference in new issue
Block a user