Skip to content

Commit

Permalink
Emit CLI warning log msg on non 64-bit hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
sug0 committed May 9, 2024
1 parent 4ed6229 commit 47a1f93
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions crates/apps/src/lib/node/ledger/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,20 @@ pub fn migrating_state() -> Option<BlockHeight> {

/// Run the ledger with an async runtime
pub fn run(config: config::Ledger, wasm_dir: PathBuf) {
if std::mem::size_of::<usize>() != 8 {
tracing::warn!("");
tracing::warn!(
"Your machine has a {}-bit CPU...",
8 * std::mem::size_of::<usize>()
);
tracing::warn!("");
tracing::warn!("A majority of nodes will run on 64-bit hardware!");
tracing::warn!("");
tracing::warn!("While not immediately being problematic, non 64-bit");
tracing::warn!("nodes may run into spurious consensus failures.");
tracing::warn!("");
}

let logical_cores = num_cpus::get();
tracing::info!("Available logical cores: {}", logical_cores);

Expand Down

0 comments on commit 47a1f93

Please sign in to comment.