sources: add more assertions
This commit is contained in:
parent
ed78cda6ad
commit
37dbc211cd
1 changed files with 5 additions and 0 deletions
|
@ -1025,8 +1025,13 @@ SRC_SelectSource(SRC_Instance updated_inst)
|
||||||
default:
|
default:
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
|
assert(trust_depth <= depth);
|
||||||
|
assert(trust_depth >= 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(depth == 0 && trust_depth == 0);
|
||||||
|
assert(2 * n_sel_sources == n_endpoints);
|
||||||
|
|
||||||
if ((best_trust_depth == 0 && best_depth <= n_sel_sources / 2) ||
|
if ((best_trust_depth == 0 && best_depth <= n_sel_sources / 2) ||
|
||||||
(best_trust_depth > 0 && best_trust_depth <= n_sel_trust_sources / 2)) {
|
(best_trust_depth > 0 && best_trust_depth <= n_sel_trust_sources / 2)) {
|
||||||
/* Could not even get half the reachable (trusted) sources to agree */
|
/* Could not even get half the reachable (trusted) sources to agree */
|
||||||
|
|
Loading…
Reference in a new issue