Skip to content

Commit

Permalink
Remove useless method
Browse files Browse the repository at this point in the history
  • Loading branch information
resetius committed Dec 1, 2023
1 parent c165f2e commit 5d2237e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/raft.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,14 +261,6 @@ TMessageHolder<TAppendEntriesRequest> TRaft::CreateAppendEntries(uint32_t nodeId
return mes;
}

std::vector<TMessageHolder<TAppendEntriesRequest>> TRaft::CreateAppendEntries() {
std::vector<TMessageHolder<TAppendEntriesRequest>> res;
for (auto [nodeId, _] : Nodes) {
res.emplace_back(CreateAppendEntries(nodeId));
}
return res;
}

void TRaft::Follower(ITimeSource::Time now, TMessageHolder<TMessage> message) {
if (auto maybeRequestVote = message.Maybe<TRequestVoteRequest>()) {
OnRequestVote(now, std::move(maybeRequestVote.Cast()));
Expand Down
1 change: 0 additions & 1 deletion src/raft.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class TRaft {
void FollowerTimeout(ITimeSource::Time now);

TMessageHolder<TRequestVoteRequest> CreateVote(uint32_t nodeId);
std::vector<TMessageHolder<TAppendEntriesRequest>> CreateAppendEntries();
TMessageHolder<TAppendEntriesRequest> CreateAppendEntries(uint32_t nodeId);
void ProcessWaiting();
ITimeSource::Time MakeElection(ITimeSource::Time now);
Expand Down

0 comments on commit 5d2237e

Please sign in to comment.