chanmgr padding: Correct docs for padding_parameters*

Prompted by
  https://gitlab.torproject.org/tpo/core/arti/-/merge_requests/657#note_2827242

These texts were out of date; one of them still mentioned
`all_zeroes`.
This commit is contained in:
Ian Jackson 2022-08-11 11:25:42 +01:00
parent cbd759163a
commit 24e2c717f0
1 changed files with 5 additions and 2 deletions

View File

@ -507,8 +507,8 @@ fn parameterize(
/// Given a `NetDirExtract` and whether we're reducing padding, return a `PaddingParameters`
///
/// With `PaddingLevel::None`, will return `PaddingParameters::all_zeroes`; but
/// does not account for padding being enabled/disabled other ways than via the config.
/// With `PaddingLevel::None`, or the consensus specifies no padding, will return `None`;
/// but does not account for other reasons why padding might be enabled/disabled.
fn padding_parameters(
config: PaddingLevel,
netdir: &NetParamsExtract,
@ -537,6 +537,9 @@ fn padding_parameters(
/// Given a `NetDirExtract` and whether we're reducing padding,
/// return a `PaddingParametersBuilder`
///
/// If the consensus specifies no padding, will return `None`;
/// but does not account for other reasons why padding might be enabled/disabled.
///
/// If `Err`, the string is a description of what is wrong with the parameters;
/// the caller should use `PaddingParameters::Default`.
fn padding_parameters_builder(