Skip to content

Commit

Permalink
dht: remove dead Node_setCost()
Browse files Browse the repository at this point in the history
  • Loading branch information
Lars Gierth committed Mar 3, 2016
1 parent dfec1bc commit d3cb495
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
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

0 comments on commit d3cb495

Please sign in to comment.