-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Conversation
/// Set a closure to call when the client wants to be restarted. | ||
/// | ||
/// The parameter passed to the callback is the name of the new chain spec to use after | ||
/// the restart. |
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.
finally a proper description of a function! 👍
fn execute_impl<Cr, Rr>(cmd: RunCmd, logger: Arc<RotatingLogger>, on_client_rq: Cr, | ||
on_updater_rq: Rr) -> Result<RunningClient, String> | ||
where Cr: Fn(String) + 'static + Send, | ||
Rr: Fn() + 'static + Send |
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.
do you know why doesn't updater care about the spec? isn't it a bug?
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.
I don't know how the updater works unfortunately
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.
you're right, it's not related to this pr. I'll ask andre
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.
@andresilva told me that everything's good :)
I think it's fine because the updater gets all its info from the operations contract, so it doesn't need the chainspec
so only the client needs to be updated with the new spec, and the updater will use the updated client to interact with the operations contract
Part of #4842
Refactors a bit of the code of
parity/run.rs
in order to have a better separation between the code that runs the client and the code that handles the ctrl+c and thecan_restart
option.