dusk-network / kadcast

Official rust implementation of the Kadcast P2P protocol for ultra-efficient message dissemination within Dusk Network
Mozilla Public License 2.0
22 stars 3 forks source link

Cannot unset udp_send_backoff_timeout from toml #105

Closed herr-seppia closed 2 years ago

herr-seppia commented 2 years ago

Describe the bug When kadcast configuration is loaded using a toml, it's not possible to leave the udp_send_backoff_timeout field to None

To Reproduce Use rusk (a kadcast library client) and remove udp_send_backoff_timeout from the default configuration.

Expected behaviour Rusk should be able to start with no backoff timeout configured.

Logs/Screenshot

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Error { inner: ErrorInner { kind: Custom, line: Some(31), col: 0, at: Some(607), message: "missing field `udp_send_backoff_timeout`", key: ["kadcast", "network"] } }', rusk/src/bin/config.rs:44:43

Additional context udp_send_backoff_timeout is using #[serde(with = "humantime_serde")] to deserialize