• David Goulet's avatar
    sendme: Add non fatal asserts for extra safety · 0cad83be
    David Goulet authored and Nick Mathewson's avatar Nick Mathewson committed
    Two non fatal asserts are added in this commit. First one is to see if the
    SENDME digest list kept on the circuit for validation ever grows bigger than
    the maximum number of expected SENDME on a circuit (currently 10).
    The second one is to know if we ever send more than one SENDME at a time on a
    circuit. In theory, we shouldn't but if we ever do, the v1 implementation
    wouldn't work because we only keep one single cell digest (the previous cell
    to the SENDME) on the circuit/cpath. Thus, sending two SENDME consecutively
    will lead to a mismatch on the other side because the same cell digest would
    be use and thus the circuit would collapse.
    Finally, add an extra debug log in case we emit a v0 which also includes the
    consensus emit version in that case.
    Part of #30428
    Signed-off-by: David Goulet's avatarDavid Goulet <dgoulet@torproject.org>