Provide local balance msat value in `ChannelForceClosed`
For accounting purposes, its nice to know what your local balance was when a channel was force-closed. This would allow you to see how many msat you lost to rounding.
if i could get some guidance i'd like to do this issue
Basically add a new field last_local_balance_msat or something like that, to the ChannelClosed event, and then fix all the compile errors where we generate that event by calling Channel::get_available_balances and including the balance_msat field.
@TheBlueMatt ok will have a shot but will ask a lot since i'm still new to rust
first question is what file handles the channel close event @TheBlueMatt
first question is what file handles the channel close event @TheBlueMatt
You can find this event type in the documentation: https://docs.rs/lightning/latest/lightning/util/events/enum.Event.html#variant.ChannelClosed
Hii, I want to do this issue, and I am new to rust, so I will need some help. I think this file handles channel close event : https://github.com/lightningdevkit/rust-lightning/blob/main/lightning/src/ln/channel.rs Am i correct ?
Sorry I think this file handles channel close event: https://github.com/lightningdevkit/rust-lightning/blob/main/lightning/src/ln/channelmanager.rs @tnull Am correct ?
You should start by updating the event itself in events.rs and compile, that will give you a list of places that need updating :)
ok thanks
what should the type be for last_local_balance_msat field @TheBlueMatt
what should the type be for last_local_balance_msat field @TheBlueMatt
@Cxxshyy should be u64!
ok thanks
what should the type be for last_local_balance_msat field @TheBlueMatt
@Cxxshyy should be
u64!
Hey everyone, I'm new opensource, but there are some issues I don't understand and the ones I do are already assigned to someone. i would like to to give a try on this issue ,so @Cxxshyy can i work with you on this issue? :)
@Lalitmohansharma1 hey man sorry i dont think this issue is big enough for 2 people to work on.
also
for this function here would i need to create a new function to obtain the local balance
@Lalitmohansharma1 hey man sorry i dont think this issue is big enough for 2 people to work on.
Ok :)
also
for this function here would i need to create a new function to obtain the local balance
Does this comment answer that: https://github.com/lightningdevkit/rust-lightning/issues/1898#issuecomment-1347474378 so just use Channel::get_available_balances?
also
for this function here would i need to create a new function to obtain the local balance
Does this comment answer that: https://github.com/lightningdevkit/rust-lightning/issues/1898#issuecomment-1347474378 so just use
Channel::get_available_balances?
on it thanks
pub fn get_available_balances(&self) -> AvailableBalances this is the function signature where availableBalances is a struct however localBal is an u64 so how can i satisfy this when i call the function

Use the relevant (local balance) field from it :)
ok i think i might have completed it now
nvm but close
@Cxxshyy / @Bolt-12 either of you actively working on this? Would be interested in picking it up if it's free.
Hey @TheBlueMatt I would like to work on this issue, is this up for grabs ?
Looks like it, its been a few months since the last comment.
Is this good to close, given that https://github.com/lightningdevkit/rust-lightning/pull/3235 was merged?