Skip to content

Commit

Permalink
provide default number of bytes if 0 is read
Browse files Browse the repository at this point in the history
  • Loading branch information
brentstone committed Jul 25, 2023
1 parent b6714b5 commit cfdc38d
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions apps/src/lib/node/ledger/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,11 @@ async fn run_aux_setup(
"VP WASM compilation cache size not configured, using 1/6 \
of available memory."
);
*available_memory_bytes / 6
if *available_memory_bytes > 0 {
*available_memory_bytes / 6
} else {
50000000
}
}
};
tracing::info!(
Expand All @@ -375,7 +379,11 @@ async fn run_aux_setup(
"Tx WASM compilation cache size not configured, using 1/6 \
of available memory."
);
*available_memory_bytes / 6
if *available_memory_bytes > 0 {
*available_memory_bytes / 6
} else {
100000000
}
}
};
tracing::info!(
Expand Down

0 comments on commit cfdc38d

Please sign in to comment.