adjust padding for 8 byte alignment

This commit is contained in:
Richard Holland
2024-11-30 21:05:16 +11:00
parent ba27030bda
commit 619d9aa746
2 changed files with 5 additions and 2 deletions

View File

@@ -69,8 +69,8 @@ struct ServerInfoHeader {
uint32_t node_size; // Size category (0=tiny through 4=huge)
uint32_t cpu_cores; // CPU core count
uint32_t ledger_range_count; // Number of range entries
uint16_t warning_flags; // Warning flags (reduced size)
uint16_t padding1; // Added to maintain alignment
uint32_t warning_flags; // Warning flags (reduced size)
uint32_t padding_1; // padding for alignment
// 64-bit metrics
uint64_t timestamp; // System time in microseconds

View File

@@ -281,6 +281,9 @@ Config::setupControl(bool bQuiet, bool bSilent, bool bStandalone)
// RAM and CPU resources. We default to "tiny" for standalone mode.
if (!bStandalone)
{
NODE_SIZE = 4;
return;
// First, check against 'minimum' RAM requirements per node size:
auto const& threshold =
sizedItems[std::underlying_type_t<SizedItem>(SizedItem::ramSizeGB)];