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

Follow-ups to #330 #366

Merged
merged 8 commits into from
Oct 8, 2024
Merged

Conversation

tnull
Copy link
Collaborator

@tnull tnull commented Oct 7, 2024

This addresses minor comments and nits found in #330.

Since we're about to make considerable changes all over the codebase with #358 and follow-ups, we opted to land #330 and address the minor feedback here, avoiding an ongoing rebase saga.

(cc @enigbe)

@tnull tnull mentioned this pull request Oct 7, 2024
tnull added 6 commits October 7, 2024 15:00
…ases and addresses"

This reverts commit 4fd1cb8 as unit
tests need to be kept deterministic, i.e., opening announced channels is
a deliberate choice on a per test case basis.
We improve the docs a bit, highlight the requirements for node aliases,
and that we'll only ever allow announcing channels if they are properly
set.
We drop the previously-introduced
`ChannelAnnouncementStatus`/`ChannelAnnouncementBlocker` types. While
informative, they were a bit too much boilerplate. Instead we opt to
simply return a `bool` from `may_announce_channel`, and don't spawn the
node announcment task to begin with if we're not configured properly.
@tnull tnull force-pushed the 2024-10-330-followups branch from 828f77f to fd70203 Compare October 7, 2024 13:06
@tnull tnull requested a review from G8XSU October 7, 2024 13:07
@tnull tnull mentioned this pull request Oct 7, 2024
src/lib.rs Show resolved Hide resolved
tests/common/mod.rs Outdated Show resolved Hide resolved
tnull added 2 commits October 8, 2024 09:13
Previously, we always opened announced channels in tests, but it should
be a deliberate choice depending on the scenario we're trying to test
for.
.. as we generally want to ~discourage users from arbitrarily opening
announced channels. They really only should do so if they are willing
and able to run a proper 24/7 forwarding node. And node operators will
likely know what to look for in the API.
@tnull tnull force-pushed the 2024-10-330-followups branch from fd70203 to 85862f5 Compare October 8, 2024 07:13
@tnull
Copy link
Collaborator Author

tnull commented Oct 8, 2024

Now force-pushed with minor fixups:

> git diff-tree -U2 fd702031 85862f53
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 05af5d67..f8a9eae7 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -400,8 +400,8 @@ pub(crate) fn premine_and_distribute_funds<E: ElectrumApi>(

 pub fn open_channel(
-       node_a: &TestNode, node_b: &TestNode, funding_amount_sat: u64, announce: bool,
+       node_a: &TestNode, node_b: &TestNode, funding_amount_sat: u64, should_announce: bool,
        electrsd: &ElectrsD,
 ) {
-       if announce {
+       if should_announce {
                node_a
                        .open_announced_channel(

@tnull tnull merged commit 58188b8 into lightningdevkit:main Oct 8, 2024
12 of 13 checks passed
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