You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Provide local balance msat value in ChannelForceClosed #1898
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.
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.
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? :)
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
Activity
Cxxshyy commentedon Dec 8, 2022
if i could get some guidance i'd like to do this issue
TheBlueMatt commentedon Dec 12, 2022
Basically add a new field
last_local_balance_msator something like that, to theChannelClosedevent, and then fix all the compile errors where we generate that event by callingChannel::get_available_balancesand including thebalance_msatfield.Cxxshyy commentedon Dec 14, 2022
@TheBlueMatt ok will have a shot but will ask a lot since i'm still new to rust
Cxxshyy commentedon Dec 16, 2022
first question is what file handles the channel close event @TheBlueMatt
tnull commentedon Dec 16, 2022
You can find this event type in the documentation: https://docs.rs/lightning/latest/lightning/util/events/enum.Event.html#variant.ChannelClosed
Sharmalm commentedon Dec 27, 2022
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 ?
Sharmalm commentedon Dec 29, 2022
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 ?
TheBlueMatt commentedon Jan 3, 2023
You should start by updating the event itself in
events.rsand compile, that will give you a list of places that need updating :)Cxxshyy commentedon Jan 3, 2023
ok thanks
Cxxshyy commentedon Jan 3, 2023
what should the type be for last_local_balance_msat field @TheBlueMatt
valentinewallace commentedon Jan 3, 2023
@Cxxshyy should be
u64!Cxxshyy commentedon Jan 3, 2023
ok thanks
Sharmalm commentedon Jan 4, 2023
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? :)
Cxxshyy commentedon Jan 4, 2023
@Lalitmohansharma1 hey man sorry i dont think this issue is big enough for 2 people to work on.
Cxxshyy commentedon Jan 4, 2023
also

for this function here would i need to create a new function to obtain the local balance
Sharmalm commentedon Jan 5, 2023
Ok :)
valentinewallace commentedon Jan 5, 2023
Does this comment answer that: #1898 (comment) so just use
Channel::get_available_balances?Cxxshyy commentedon Jan 5, 2023
on it thanks
Cxxshyy commentedon Jan 5, 2023
pub fn get_available_balances(&self) -> AvailableBalancesthis is the function signature where availableBalances is a struct however localBal is an u64 so how can i satisfy this when i call the functionTheBlueMatt commentedon Jan 6, 2023
Use the relevant (local balance) field from it :)
Cxxshyy commentedon Jan 6, 2023
ok i think i might have completed it now
Cxxshyy commentedon Jan 6, 2023
nvm but close
freddiekrugerrand commentedon Mar 30, 2023
@Cxxshyy / @BOLT-12 either of you actively working on this? Would be interested in picking it up if it's free.
srikanth-iyengar commentedon Apr 23, 2024
Hey @TheBlueMatt I would like to work on this issue, is this up for grabs ?
TheBlueMatt commentedon Apr 23, 2024
Looks like it, its been a few months since the last comment.
Mirebella commentedon Oct 13, 2024
Is this good to close, given that #3235 was merged?