mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-14 18:30:52 +02:00
htlcswitch: use an atomic load for link bandwidth during local dispatch
This commit is contained in:
@@ -256,7 +256,7 @@ out:
|
||||
// * avoid full channel depletion at higher
|
||||
// level (here) instead of within state
|
||||
// machine?
|
||||
if link.availableBandwidth < int64(amt) {
|
||||
if atomic.LoadInt64(&link.availableBandwidth) < int64(amt) {
|
||||
continue
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user