Commit df515f8
miller070
refactor: dedup latest-non-deprecated loop, add missing tests, extract ZERO_ADDRESS_STR
a) router-registry: extract fn latest_non_deprecated helper to eliminate
the byte-for-byte duplicate reverse-iteration loop that existed in both
get_latest and the no-constraint branch of get_latest_with_constraint.
Both callers now delegate to the single shared helper.
b) router-access: add test_get_role_parent_returns_none_when_not_set to
cover the baseline case that get_role_parent returns None for a role
that was never passed to set_role_parent. Mirrors the existing
test_get_role_admin_returns_none_when_not_set.
c) router-access: add test_is_blacklisted_reflects_blacklist_state to
directly exercise the is_blacklisted view function (false -> true after
blacklist() -> false after unblacklist()), which was previously only
covered indirectly through has_role tests.
d) router-core: extract ZERO_ADDRESS_STR constant so the Stellar zero
address literal is defined in one place and referenced by both
register_route and register_route_internal.1 parent c28197b commit df515f8
3 files changed
Lines changed: 76 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
| 1703 | + | |
| 1704 | + | |
| 1705 | + | |
| 1706 | + | |
| 1707 | + | |
| 1708 | + | |
| 1709 | + | |
| 1710 | + | |
| 1711 | + | |
| 1712 | + | |
| 1713 | + | |
| 1714 | + | |
| 1715 | + | |
| 1716 | + | |
| 1717 | + | |
| 1718 | + | |
| 1719 | + | |
| 1720 | + | |
| 1721 | + | |
| 1722 | + | |
| 1723 | + | |
| 1724 | + | |
| 1725 | + | |
| 1726 | + | |
| 1727 | + | |
| 1728 | + | |
| 1729 | + | |
| 1730 | + | |
1703 | 1731 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
192 | 199 | | |
193 | 200 | | |
194 | 201 | | |
| |||
281 | 288 | | |
282 | 289 | | |
283 | 290 | | |
284 | | - | |
| 291 | + | |
285 | 292 | | |
286 | 293 | | |
287 | 294 | | |
| |||
2168 | 2175 | | |
2169 | 2176 | | |
2170 | 2177 | | |
2171 | | - | |
| 2178 | + | |
2172 | 2179 | | |
2173 | 2180 | | |
2174 | 2181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
316 | 316 | | |
317 | 317 | | |
318 | 318 | | |
319 | | - | |
320 | | - | |
321 | | - | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
326 | | - | |
327 | | - | |
328 | | - | |
329 | | - | |
330 | | - | |
331 | | - | |
332 | | - | |
333 | | - | |
334 | | - | |
| 319 | + | |
335 | 320 | | |
336 | 321 | | |
337 | 322 | | |
| |||
357 | 342 | | |
358 | 343 | | |
359 | 344 | | |
360 | | - | |
| 345 | + | |
361 | 346 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
371 | | - | |
372 | | - | |
373 | | - | |
374 | | - | |
| 347 | + | |
| 348 | + | |
375 | 349 | | |
376 | | - | |
| 350 | + | |
377 | 351 | | |
378 | 352 | | |
379 | 353 | | |
| |||
782 | 756 | | |
783 | 757 | | |
784 | 758 | | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
785 | 793 | | |
786 | 794 | | |
787 | 795 | | |
| |||
0 commit comments