Skip to content

Commit

Permalink
feat: sigint initialization only after snapshots is applied (#1356)
Browse files Browse the repository at this point in the history
## What ❔

Moved sigint initialization to after snapshots is applied

## Why ❔

Currently sigint support is broken for snapshots db recovery, this PR
moves custom sigint to a later stage, so that it's no longer a problem

---------

Signed-off-by: tomg10 <lemures64@gmail.com>
  • Loading branch information
tomg10 committed Mar 22, 2024
1 parent 6a2fa5d commit c7c7356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/bin/external_node/src/main.rs
Expand Up @@ -519,7 +519,6 @@ async fn main() -> anyhow::Result<()> {
let main_node_client = <dyn MainNodeClient>::json_rpc(&main_node_url)
.context("Failed creating JSON-RPC client for main node")?;

let sigint_receiver = setup_sigint_handler();
tracing::warn!("The external node is in the alpha phase, and should be used with caution.");
tracing::info!("Started the external node");

Expand Down Expand Up @@ -569,6 +568,7 @@ async fn main() -> anyhow::Result<()> {
opt.enable_snapshots_recovery,
)
.await?;
let sigint_receiver = setup_sigint_handler();

// Revert the storage if needed.
let reverter = BlockReverter::new(
Expand Down

0 comments on commit c7c7356

Please sign in to comment.