| 86 | } |
| 87 | |
| 88 | void SigNode::ComputeTopoHash0() { |
| 89 | topo_hash_.clear(); |
| 90 | last_hashed_nodes_ = next_hashed_nodes_ = node_mask_; |
| 91 | |
| 92 | // TODO(babkin): include the attrbutes too, as an option. |
| 93 | size_t hval = std::hash<string>()(opcode()); |
| 94 | |
| 95 | // Getting the topology of the links in to the hash early should get more |
| 96 | // conflicts resolved early. |
| 97 | for (const auto& entry : hashed_peers_) { |
| 98 | CombineHash(entry.link_hash, &hval); |
| 99 | } |
| 100 | |
| 101 | topo_hash_.push_back(hval); |
| 102 | } |
| 103 | |
| 104 | void SigNode::ComputeTopoHash(int distance) { |
| 105 | // The new starting point. |
no test coverage detected