Closed zapomatic closed 4 months ago
To clarify user expectations, I would think that bos balance
would return an answer to the question of "What number of sats does this node own if all current HTLCs are assumed to fail/cancel?"
did you try using bos balance --detailed
That seems to be more what I'm looking for (the offchain_balance
output from --detailed). Thanks!
bos balance relays the balance sums from lnd directly, detailed does a source analysis of relevant rows and calculates the balance itself, with assumptions that you referenced about the in-flight or potential transfer changes to produce a more stable output
This may be an issue for LND not serving enough info in the APIs, but it seems that bos balance is fluctuating as the HTLCs are adjusting. As a node with dozens of in-flight HTLCs constantly, using
bos balance
does not provide a reliable snapshot of the funds that belong to the node. Runningbos balance
repeatedly returns amounts that are +- hundreds or millions of sats.Is this because one side of the HTLC may be accounted for but not the other? Or is it a timing issue with gathering the stats while an HTLC comes or goes?
To illustrate, running this on my node just now:
produces 10 outputs that contain the following numeric diffs from the prior output: