Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dht: remove dead Node_setCost() #910

Merged
merged 1 commit into from Mar 9, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions dht/dhtcore/Node.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,6 @@ bool Node_isAncestorOf(struct Node_Two* ancestor, struct Node_Two* child)
}
}

void Node_setCost(struct Node_Two* node, uint64_t newCost)
{
if (newCost != UINT64_MAX) {
Assert_true(Node_getBestParent(node));
Assert_true(node->address.path < UINT64_MAX);
} else {
Assert_true(!Node_getBestParent(node));
Assert_true(node->address.path == UINT64_MAX);
}
node->cost_pvt = newCost;
}

void Node_setParentCostAndPath(struct Node_Two* node,
struct Node_Link* bestParent,
uint64_t cost,
Expand Down
1 change: 0 additions & 1 deletion dht/dhtcore/Node.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ static inline uint64_t Node_getCost(struct Node_Two* node)
{
return node->cost_pvt;
}
void Node_setCost(struct Node_Two* node, uint64_t newCost);

static inline struct Node_Link* Node_getBestParent(struct Node_Two* node)
{
Expand Down