-
Notifications
You must be signed in to change notification settings - Fork 91
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
Follow-ups to #330 #366
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Merged
…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.
828f77f
to
fd70203
Compare
Merged
G8XSU
reviewed
Oct 7, 2024
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.
fd70203
to
85862f5
Compare
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( |
G8XSU
approved these changes
Oct 8, 2024
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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)