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

Keep track of roles for all nodes in the global config

Ian Goldberg 1 рік тому
батько
коміт
68cc68034d
2 змінених файлів з 2 додано та 0 видалено
  1. 1 0
      Enclave/config.cpp
  2. 1 0
      Enclave/config.hpp

+ 1 - 0
Enclave/config.cpp

@@ -65,6 +65,7 @@ bool ecall_config_load(threadid_t nthreads, bool private_routing,
         }
         cumul_weight += nw.weight;
         g_teems_config.weights.push_back(nw);
+        g_teems_config.roles.push_back(apinodeconfigs[i].roles);
         if (i == my_node_num) {
             g_teems_config.my_weight = nw.weight;
         }

+ 1 - 0
Enclave/config.hpp

@@ -30,6 +30,7 @@ struct Config {
     uint8_t m_pub_in;
     uint8_t my_weight;
     bool private_routing;
+    std::vector<uint8_t> roles;
     std::vector<NodeWeight> weights;
     std::vector<nodenum_t> ingestion_nodes;
     std::vector<nodenum_t> routing_nodes;