-
Notifications
You must be signed in to change notification settings - Fork 358
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
Add support for multiple connection hops in create channel
command
#4067
Conversation
* Add `--connection-hops` parameter to `CreateChannelCommand` * Add method `run_multihop_reusing_connection()` to struct `CreateChannelCommand` * Add associated function `new_multihop()` to struct `Channel`
@@ -322,6 +323,9 @@ impl CreateChannelCommand { | |||
) { | |||
let config = app_config(); | |||
|
|||
// Set global registry to get or spawn chain handles | |||
set_global_registry(SharedRegistry::new((*app_config()).clone())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even though the registry is being set here (as it is needed further down in the chain of function calls), the chains are being spawned using spawn_chain_runtime()
rather than using get_or_spawn()
within run_multihop_reusing_connection()
. This was to keep it consistent with run_reusing_connection()
which was already implemented and uses spawn_chain_runtime()
.
As get_or_spawn()
might give us some performance, if we decide to keep using the registry in the CLIs we should use it here and make it consistent across all methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch! Yeah let's see by the end of the implementation phase which technique we want to go with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 👏
Closes: #4062
Description
create channel
command #4062PR author checklist:
unclog
.docs/
).Reviewer checklist:
Files changed
in the GitHub PR explorer.