Skip to content

Allow pushing some msats on channel open #63

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
Apr 24, 2023

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Apr 11, 2023

We had so far omitted the push_msat field, but it's likely useful, so we add it here.

@tnull tnull force-pushed the 2023-04-push-msat branch 2 times, most recently from f489ed8 to 5022c26 Compare April 18, 2023 07:45
@tnull
Copy link
Collaborator Author

tnull commented Apr 18, 2023

Rebased on main after #13 has been merged.


let funding_txo = loop {
let details = node_a.list_channels();

if details.is_empty() || details[0].funding_txo.is_none() {
std::thread::sleep(Duration::from_secs(1));
} else {
assert_eq!(details[0].inbound_capacity_msat, 39000000);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to refresh my own understanding, why is this not 40000000? A reserve?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, our current default for the channel reserve is max(1%, 1000sats), which is why we have 1000sats less inbound liquidity here (cf. https://docs.rs/lightning/latest/lightning/util/config/struct.ChannelHandshakeConfig.html#structfield.their_channel_reserve_proportional_millionths).

@tnull tnull force-pushed the 2023-04-push-msat branch 2 times, most recently from e678b1f to 03bb853 Compare April 24, 2023 09:25
@tnull
Copy link
Collaborator Author

tnull commented Apr 24, 2023

Rebased on main and addressed feedback.

Copy link
Contributor

@jkczyz jkczyz left a comment

Choose a reason for hiding this comment

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

LGTM. Please squash.

@tnull tnull force-pushed the 2023-04-push-msat branch from 03bb853 to 98474f3 Compare April 24, 2023 16:41
@tnull
Copy link
Collaborator Author

tnull commented Apr 24, 2023

Squashed without further changes.

@tnull tnull merged commit 2ceb197 into lightningdevkit:main Apr 24, 2023
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