Merge pull request #4721 from nymtech/jon/node-role-default

Default construct NodeRole
This commit is contained in:
Tommy Verrall
2024-07-22 15:09:27 +02:00
committed by GitHub
+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,