Default construct NodeRole for backwards compatibility

This commit is contained in:
Jon Häggblad
2024-07-22 13:54:47 +02:00
parent 72e243042e
commit 21cd90f238
+6
View File
@@ -612,9 +612,15 @@ pub struct NymNodeDescription {
// for now we only care about their ws/wss situation, nothing more
pub mixnet_websockets: WebSockets,
#[serde(default = "default_node_role")]
pub role: NodeRole,
}
// For backwards compatibility, set a slightly artificial default
fn default_node_role() -> NodeRole {
NodeRole::Inactive
}
#[derive(Clone, Debug, Serialize, Deserialize, schemars::JsonSchema)]
pub struct DescribedGateway {
pub bond: GatewayBond,