Renamed the type alias NodeId to MixId and fixed some usages (#1682)

* Renamed the type alias NodeId to MixId and fixed some usages

* fix(wallet): bonding context

* fix(wallet): remove ip field (type error)

Co-authored-by: pierre <dommerc.pierre@gmail.com>
This commit is contained in:
Jędrzej Stuczyński
2022-10-17 17:25:40 +01:00
committed by GitHub
parent 6a3ac6b9be
commit c3bea668d5
84 changed files with 540 additions and 540 deletions
@@ -5,7 +5,7 @@ use cosmwasm_std::{Coin, Decimal};
use mixnet_contract_common::mixnode::MixNodeDetails;
use mixnet_contract_common::reward_params::{Performance, RewardingParams};
use mixnet_contract_common::rewarding::RewardEstimate;
use mixnet_contract_common::{Interval, MixNode, NodeId, Percent, RewardedSetNodeStatus};
use mixnet_contract_common::{Interval, MixId, MixNode, Percent, RewardedSetNodeStatus};
use schemars::JsonSchema;
use serde::{Deserialize, Serialize};
use std::{fmt, time::Duration};
@@ -48,7 +48,7 @@ impl MixnodeStatus {
ts(export_to = "ts-packages/types/src/types/rust/MixnodeCoreStatusResponse.ts")
)]
pub struct MixnodeCoreStatusResponse {
pub mix_id: NodeId,
pub mix_id: MixId,
pub count: i32,
}
@@ -88,7 +88,7 @@ impl MixNodeBondAnnotated {
&self.mixnode_details.bond_information.mix_node
}
pub fn mix_id(&self) -> NodeId {
pub fn mix_id(&self) -> MixId {
self.mixnode_details.mix_id()
}
}
@@ -119,7 +119,7 @@ pub struct RewardEstimationResponse {
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]
pub struct UptimeResponse {
pub mix_id: NodeId,
pub mix_id: MixId,
pub avg_uptime: u8,
}
@@ -215,7 +215,7 @@ pub struct AllInclusionProbabilitiesResponse {
#[derive(Clone, Serialize, schemars::JsonSchema)]
pub struct InclusionProbability {
pub id: NodeId,
pub mix_id: MixId,
pub in_active: f64,
pub in_reserve: f64,
}