Переглянути джерело

Weights only matter for routing nodes

Ian Goldberg 1 рік тому
батько
коміт
826c701d52
1 змінених файлів з 3 додано та 1 видалено
  1. 3 1
      Enclave/config.cpp

+ 3 - 1
Enclave/config.cpp

@@ -36,7 +36,8 @@ bool ecall_config_load(threadid_t nthreads, bool private_routing,
     for (nodenum_t i=0; i<num_nodes; ++i) {
         NodeWeight nw;
         nw.startweight = cumul_weight;
-        nw.weight = apinodeconfigs[i].weight;
+        // Weights only matter for routing nodes
+        nw.weight = 0;
         if (apinodeconfigs[i].roles & ROLE_INGESTION) {
             g_teems_config.num_ingestion_nodes += 1;
             if (i < my_node_num) {
@@ -46,6 +47,7 @@ bool ecall_config_load(threadid_t nthreads, bool private_routing,
             }
         }
         if (apinodeconfigs[i].roles & ROLE_ROUTING) {
+            nw.weight = apinodeconfigs[i].weight;
             g_teems_config.num_routing_nodes += 1;
             if (i < my_node_num) {
                 rte_smaller.push_back(i);