mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 02:00:54 +02:00
autopilot: use updateBalance rather than tracking balance explicitly
In this commit, we modify the balanceUpdate autopilot signal to update the balance according to what's returned to the WalletBalance callback rather than explicitly tracking the balance. This gives the agent a better sense of what the wallet's balance actually is.
This commit is contained in:
4
pilot.go
4
pilot.go
@ -224,8 +224,8 @@ func initAutoPilot(svr *server, cfg *autoPilotConfig) (*autopilot.Agent, error)
|
||||
|
||||
for {
|
||||
select {
|
||||
case txnUpdate := <-txnSubscription.ConfirmedTransactions():
|
||||
pilot.OnBalanceChange(txnUpdate.Value)
|
||||
case <-txnSubscription.ConfirmedTransactions():
|
||||
pilot.OnBalanceChange()
|
||||
case <-svr.quit:
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user