raft: replication test: move up set_config

Move set_config above raft_cluster for a subsequent commit.

Signed-off-by: Alejo Sanchez <alejo.sanchez@scylladb.com>
This commit is contained in:
Alejo Sanchez
2021-05-06 16:56:06 -04:00
parent 57da05c986
commit a3700a6d0a

View File

@@ -396,6 +396,16 @@ public:
std::unordered_map<raft::server_id, rpc*> rpc::net;
struct set_config_entry {
size_t node_idx;
bool can_vote;
set_config_entry(size_t idx, bool can_vote = true)
: node_idx(idx), can_vote(can_vote)
{}
};
using set_config = std::vector<set_config_entry>;
struct test_server {
std::unique_ptr<raft::server> server;
state_machine* sm;
@@ -559,16 +569,6 @@ struct leader {
};
using partition = std::vector<std::variant<leader,int>>;
struct set_config_entry {
size_t node_idx;
bool can_vote;
set_config_entry(size_t idx, bool can_vote = true)
: node_idx(idx), can_vote(can_vote)
{}
};
using set_config = std::vector<set_config_entry>;
struct tick {
uint64_t ticks;
};