breakdown lnd balance
This commit is contained in:
parent
766224ba01
commit
c708027529
1 changed files with 2 additions and 0 deletions
|
|
@ -49,6 +49,7 @@ export class Watchdog {
|
|||
|
||||
getTotalLndBalance = async () => {
|
||||
const { confirmedBalance, channelsBalance } = await this.lnd.GetBalance()
|
||||
this.log(confirmedBalance, "sats in chain wallet")
|
||||
let total = confirmedBalance
|
||||
channelsBalance.forEach(c => {
|
||||
let outgoingSats = 0
|
||||
|
|
@ -58,6 +59,7 @@ export class Watchdog {
|
|||
}
|
||||
})
|
||||
total += Number(c.localBalanceSats) - outgoingSats
|
||||
this.log(c.localBalanceSats, "sats in channel", c.channelId, "with", outgoingSats, "sats in pending outgoing htlcs")
|
||||
})
|
||||
return total
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue