Skip to content

Add MAX_FUNDING_SATOSHIS constant. #38

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

Merged
merged 1 commit into from
Jun 30, 2018

Conversation

jeandudey
Copy link
Contributor

No description provided.

@TheBlueMatt
Copy link
Collaborator

TheBlueMatt commented Jun 30, 2018 via email

return Err(HandleError{err: "funding value > 2^24", msg: Some(msgs::ErrorAction::DisconnectPeer{})});
}
if msg.funding_satoshis > 21000000 * 100000000 {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I removed this condition because I thought it never was going to be true because MAX_FUNDING_SATOSHIS should never be more high than 2,1x10^15, the test I added checks that.

@jeandudey jeandudey force-pushed the max-funding-satoshis branch from 5d6c8d6 to 4bd2555 Compare June 30, 2018 15:03
@jeandudey
Copy link
Contributor Author

@TheBlueMatt Done 👍

Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

+1

This constants defines the maximum value of `open_channel.funding_satoshis`,
currently it's defined to be 2^24 according to the BOLT lightningdevkit#2 specification.
Also a test was added to check that the constant is never over 2,1x10^15
(maximum satoshis in bitcoin) if modified.

Signed-off-by: Jean Pierre Dudey <jeandudey@hotmail.com>
@jeandudey jeandudey force-pushed the max-funding-satoshis branch from 4bd2555 to 6707db6 Compare June 30, 2018 15:13
@TheBlueMatt TheBlueMatt merged commit a426062 into lightningdevkit:master Jun 30, 2018
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