Skip to content

Allow pushing some msats on channel open#63

Merged
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2023-04-push-msat
Apr 24, 2023
Merged

Allow pushing some msats on channel open#63
tnull merged 1 commit into
lightningdevkit:mainfrom
tnull:2023-04-push-msat

Conversation

@tnull

@tnull tnull commented Apr 11, 2023

Copy link
Copy Markdown
Collaborator

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

tnull commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator Author

Rebased on main after #13 has been merged.

Comment thread src/test/functional_tests.rs Outdated
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
Copy Markdown
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
Copy Markdown
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).

Comment thread src/test/functional_tests.rs Outdated
@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

tnull commented Apr 24, 2023

Copy link
Copy Markdown
Collaborator Author

Rebased on main and addressed feedback.

@jkczyz jkczyz left a comment

Copy link
Copy Markdown
Contributor

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

tnull commented Apr 24, 2023

Copy link
Copy Markdown
Collaborator Author

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