chanmgr, testing: Provide config accessor for testing
The top-level global config is going to want to see whether its machinations have the right effect.
This commit is contained in:
parent
582430d1ac
commit
5e307a0989
|
@ -12,6 +12,7 @@ categories = ["network-programming", "cryptography"]
|
|||
repository = "https://gitlab.torproject.org/tpo/core/arti.git/"
|
||||
|
||||
[features]
|
||||
testing = [ ]
|
||||
|
||||
[dependencies]
|
||||
async-trait = "0.1.2"
|
||||
|
|
|
@ -24,6 +24,14 @@ pub struct ChannelConfig {
|
|||
}
|
||||
impl_standard_builder! { ChannelConfig }
|
||||
|
||||
#[cfg(feature = "testing")]
|
||||
impl ChannelConfig {
|
||||
/// The padding level (accessor for testing)
|
||||
pub fn padding(&self) -> PaddingLevel {
|
||||
self.padding
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
// @@ begin test lint list maintained by maint/add_warning @@
|
||||
|
|
Loading…
Reference in New Issue