Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small tweaks post #633/#684 #690

Merged
merged 4 commits into from
Sep 16, 2020

Conversation

TheBlueMatt
Copy link
Collaborator

This fixes one bug that was noticed in review #633 (see #680 (comment) / #633 (comment)), updates the bindings for both 633 and 684, and tweaks one comment from 633.

@codecov
Copy link

codecov bot commented Sep 14, 2020

Codecov Report

Merging #690 into main will increase coverage by 0.00%.
The diff coverage is 97.80%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #690   +/-   ##
=======================================
  Coverage   91.96%   91.96%           
=======================================
  Files          35       36    +1     
  Lines       20154    20161    +7     
=======================================
+ Hits        18534    18541    +7     
  Misses       1620     1620           
Impacted Files Coverage Δ
lightning/src/ln/chan_utils.rs 97.37% <ø> (ø)
lightning/src/ln/functional_tests.rs 97.13% <ø> (-0.03%) ⬇️
lightning/src/ln/onion_route_tests.rs 97.78% <97.78%> (ø)
lightning/src/ln/channel.rs 86.23% <100.00%> (ø)
lightning/src/ln/channelmanager.rs 85.64% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9d3033...0f6b000. Read the comment docs.

Copy link

@ariard ariard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review ACK 3a025cb

/// a broadcaster's commitment transactions. This key is static across every commitment
/// transaction.
/// The public key on which the non-broadcaster (ie the countersignatory) receives an immediately
/// spendable primary channel balance. This key is static across every commitment transaction.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is broadcaster's commitment transaction clearer ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a little wordy now, but at least no one is going to confuse it...better?

@TheBlueMatt TheBlueMatt force-pushed the 2020-09-633-bindings branch 3 times, most recently from 2c2724a to 8407ae6 Compare September 16, 2020 01:32
@TheBlueMatt
Copy link
Collaborator Author

Further updated bindings to include #683.

They all have a specific structure, so having them in the mess that
is functional_tests isn't really conducive to readability. More
importantly, functional_tests is so big it slows down compilation,
so even dropping a few hundred lines is a win.
 * Channel::get_counterparty_htlc_minimum_msat() returned
   holder_htlc_minimum_msat, which was obviously incorrect.
 * ChannelManager::get_channel_update set htlc_minimum_msat to
   Channel::get_holder_htlc_minimum_msat(), but the spec explicitly
   states we "MUST set htlc_minimum_msat to the minimum HTLC value
   (in millisatoshi) that the channel peer will accept." This makes
   sense because the reason we're rejecting the HTLC is because our
   counterparty's HTLC minimum value is too small for us to send to
   them, our own HTLC minimum value plays no role. Further, our
   router already expects this - looking at the same directional
   channel info as it does fees.

Finally, we add a test in the existing onion router test cases
which fails if either of the above is incorrect (the second issue
discovered in the process of writing the test).
@TheBlueMatt
Copy link
Collaborator Author

Chatted a bit with @ariard about this one on IRC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants