Skip to content

Provide local balance msat value in ChannelForceClosed #1898

Closed

Description

@TheBlueMatt

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.

Activity

  1. added this to the 0.1.1 milestone on Dec 4, 2022
  2. Cxxshyy commented on Dec 8, 2022

    @Cxxshyy

    if i could get some guidance i'd like to do this issue

  3. TheBlueMatt commented on Dec 12, 2022

    @TheBlueMatt
    CollaboratorAuthor

    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.

  4. Cxxshyy commented on Dec 14, 2022

    @Cxxshyy

    @TheBlueMatt ok will have a shot but will ask a lot since i'm still new to rust

  5. Cxxshyy commented on Dec 16, 2022

    @Cxxshyy

    first question is what file handles the channel close event @TheBlueMatt

  6. tnull commented on Dec 16, 2022

    @tnull
    Contributor

    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

  7. Sharmalm commented on Dec 27, 2022

    @Sharmalm
    Contributor

    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 ?

  8. Sharmalm commented on Dec 29, 2022

    @Sharmalm
    Contributor
  9. TheBlueMatt commented on Jan 3, 2023

    @TheBlueMatt
    CollaboratorAuthor

    You should start by updating the event itself in events.rs and compile, that will give you a list of places that need updating :)

  10. Cxxshyy commented on Jan 3, 2023

    @Cxxshyy

    ok thanks

  11. Cxxshyy commented on Jan 3, 2023

    @Cxxshyy

    what should the type be for last_local_balance_msat field @TheBlueMatt

  12. valentinewallace commented on Jan 3, 2023

    @valentinewallace
    Contributor

    what should the type be for last_local_balance_msat field @TheBlueMatt

    @Cxxshyy should be u64!

  13. Cxxshyy commented on Jan 3, 2023

    @Cxxshyy

    ok thanks

    what should the type be for last_local_balance_msat field @TheBlueMatt

    @Cxxshyy should be u64!

  14. Sharmalm commented on Jan 4, 2023

    @Sharmalm
    Contributor

    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? :)

  15. Cxxshyy commented on Jan 4, 2023

    @Cxxshyy

    @Lalitmohansharma1 hey man sorry i dont think this issue is big enough for 2 people to work on.

  16. Cxxshyy commented on Jan 4, 2023

    @Cxxshyy

    also
    image
    for this function here would i need to create a new function to obtain the local balance

  17. Sharmalm commented on Jan 5, 2023

    @Sharmalm
    Contributor

    @Lalitmohansharma1 hey man sorry i dont think this issue is big enough for 2 people to work on.

    Ok :)

  18. valentinewallace commented on Jan 5, 2023

    @valentinewallace
    Contributor

    also image for this function here would i need to create a new function to obtain the local balance

    Does this comment answer that: #1898 (comment) so just use Channel::get_available_balances?

  19. Cxxshyy commented on Jan 5, 2023

    @Cxxshyy

    also image for this function here would i need to create a new function to obtain the local balance

    Does this comment answer that: #1898 (comment) so just use Channel::get_available_balances?

    on it thanks

  20. Cxxshyy commented on Jan 5, 2023

    @Cxxshyy

    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
    image

  21. TheBlueMatt commented on Jan 6, 2023

    @TheBlueMatt
    CollaboratorAuthor

    Use the relevant (local balance) field from it :)

  22. Cxxshyy commented on Jan 6, 2023

    @Cxxshyy

    ok i think i might have completed it now

  23. Cxxshyy commented on Jan 6, 2023

    @Cxxshyy

    nvm but close

  24. freddiekrugerrand commented on Mar 30, 2023

    @freddiekrugerrand
    Contributor

    @Cxxshyy / @BOLT-12 either of you actively working on this? Would be interested in picking it up if it's free.

  25. srikanth-iyengar commented on Apr 23, 2024

    @srikanth-iyengar

    Hey @TheBlueMatt I would like to work on this issue, is this up for grabs ?

  26. TheBlueMatt commented on Apr 23, 2024

    @TheBlueMatt
    CollaboratorAuthor

    Looks like it, its been a few months since the last comment.

  27. Mirebella commented on Oct 13, 2024

    @Mirebella
    Contributor

    Is this good to close, given that #3235 was merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions