Skip to content

Commit

Permalink
Merge pull request #4721 from nymtech/jon/node-role-default
Browse files Browse the repository at this point in the history
Default construct NodeRole
  • Loading branch information
tommyv1987 committed Jul 22, 2024
2 parents 72e2430 + 21cd90f commit 52f5656
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions nym-api/nym-api-requests/src/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 52f5656

Please sign in to comment.