autopilot: ensure access to pendingOpens in thread-safe when logging

This commit is contained in:
Olaoluwa Osuntokun 2017-12-10 15:46:39 -08:00
parent 720a8c7e96
commit 2e2b262999
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21
1 changed files with 2 additions and 0 deletions

View File

@ -321,7 +321,9 @@ func (a *Agent) controller(startingBalance btcutil.Amount) {
}
}
pendingMtx.Lock()
log.Debugf("Pending channels: %v", spew.Sdump(pendingOpens))
pendingMtx.Unlock()
// With all the updates applied, we'll obtain a set of
// the current active channels (confirmed channels),