rust-lightning icon indicating copy to clipboard operation
rust-lightning copied to clipboard

Add `last_local_balance_msats` field

Open Mirebella opened this issue 1 year ago • 5 comments

This PR adds last_local_balance_msats field. Solves https://github.com/lightningdevkit/rust-lightning/issues/1898 .

I have a few open questions:

  • what value should I assign to last_local_balance_msats, in file channel.rs at https://github.com/Mirebella/rust-lightning/blob/3eba0e2bbcb8547d561b175b1f19dd19565911b3/lightning/src/ln/channel.rs#L9591C1-L9591C33
  • in mod.rs at https://github.com/Mirebella/rust-lightning/blob/3eba0e2bbcb8547d561b175b1f19dd19565911b3/lightning/src/events/mod.rs#L1538C6-L1538C44 I saw that tlv fields are numbered differently(sometimes even numbers, sometimes odd numbers). I added my variable under number 11. Is that correct?

Mirebella avatar Aug 11 '24 16:08 Mirebella

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 90.87%. Comparing base (f7cc40e) to head (5d48d58). Report is 132 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3235      +/-   ##
==========================================
+ Coverage   89.64%   90.87%   +1.23%     
==========================================
  Files         126      127       +1     
  Lines      102399   116414   +14015     
  Branches   102399   116414   +14015     
==========================================
+ Hits        91793   105792   +13999     
- Misses       7881     7993     +112     
+ Partials     2725     2629      -96     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 11 '24 17:08 codecov[bot]

Does it look good?

Mirebella avatar Aug 13 '24 08:08 Mirebella

When you update the docs, please feel free to squash the commits down into one, but include more detail in the commit message - why was this change needed, what did the change do, any details about why the change was done in the way it was, etc.

TheBlueMatt avatar Aug 14 '24 15:08 TheBlueMatt

This basically LGTM, modulo the indentation note and the git commit message being missing. See https://cbea.ms/git-commit/ for a much, much, much longer discussion of how to write good commit messages.

TheBlueMatt avatar Sep 03 '24 16:09 TheBlueMatt

Addressed all your points above, ready for review.

Mirebella avatar Sep 14 '24 08:09 Mirebella

Done

TheBlueMatt avatar Oct 08 '24 15:10 TheBlueMatt

@TheBlueMatt Thank you very much

Mirebella avatar Oct 10 '24 15:10 Mirebella