feat: update node type references from 3Node to MyceliumNode across codebase
This commit is contained in:
@@ -169,7 +169,7 @@ impl FarmerService {
|
||||
last_seen: Some(Utc::now()),
|
||||
health_score: 100.0,
|
||||
region: node_data.region.unwrap_or_else(|| "Unknown".to_string()),
|
||||
node_type: node_data.node_type.unwrap_or_else(|| "3Node".to_string()),
|
||||
node_type: node_data.node_type.unwrap_or_else(|| "MyceliumNode".to_string()),
|
||||
slice_formats: node_data.slice_formats.clone(),
|
||||
rental_options: node_data.rental_options.as_ref().map(|opts| serde_json::to_value(opts).unwrap_or_default()),
|
||||
staking_options: None,
|
||||
@@ -375,7 +375,7 @@ impl FarmerService {
|
||||
earnings_today_usd: Decimal::ZERO,
|
||||
name: if grid_data.farm_name.is_empty() { format!("Grid Node {}", grid_node_id) } else { grid_data.farm_name.clone() },
|
||||
region: if grid_data.country.is_empty() { "Unknown".to_string() } else { grid_data.country.clone() },
|
||||
node_type: "3Node".to_string(),
|
||||
node_type: "MyceliumNode".to_string(),
|
||||
slice_formats: None, // Not used in new slice system
|
||||
staking_options: None,
|
||||
availability_status: crate::models::user::NodeAvailabilityStatus::Available,
|
||||
@@ -1316,7 +1316,7 @@ impl FarmerService {
|
||||
.earnings_today_usd(Decimal::ZERO)
|
||||
.health_score(100.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown".to_string() } else { grid_data.country.clone() })
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.build()?;
|
||||
@@ -1371,7 +1371,7 @@ impl FarmerService {
|
||||
.earnings_today_usd(Decimal::ZERO)
|
||||
.health_score(100.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown".to_string() } else { grid_data.country.clone() })
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.build()
|
||||
@@ -1460,7 +1460,7 @@ impl FarmerService {
|
||||
.last_seen(Utc::now())
|
||||
.health_score(95.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown" } else { &grid_data.country }.to_string())
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.availability_status(crate::models::user::NodeAvailabilityStatus::Available);
|
||||
@@ -1536,7 +1536,7 @@ impl FarmerService {
|
||||
.last_seen(Utc::now())
|
||||
.health_score(95.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown" } else { &grid_data.country }.to_string())
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.availability_status(crate::models::user::NodeAvailabilityStatus::Available);
|
||||
@@ -1638,7 +1638,7 @@ impl FarmerService {
|
||||
.last_seen(Utc::now())
|
||||
.health_score(95.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown" } else { &grid_data.country }.to_string())
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.availability_status(crate::models::user::NodeAvailabilityStatus::Available);
|
||||
@@ -1703,7 +1703,7 @@ impl FarmerService {
|
||||
.last_seen(Utc::now())
|
||||
.health_score(95.0)
|
||||
.region(if grid_data.country.is_empty() { "Unknown" } else { &grid_data.country }.to_string())
|
||||
.node_type("3Node".to_string())
|
||||
.node_type("MyceliumNode".to_string())
|
||||
.grid_node_id(grid_node_id)
|
||||
.grid_data(grid_data)
|
||||
.availability_status(crate::models::user::NodeAvailabilityStatus::Available);
|
||||
@@ -1803,7 +1803,7 @@ impl FarmerService {
|
||||
last_seen: Some(Utc::now()),
|
||||
health_score: 100.0,
|
||||
region: if grid_data.country.is_empty() { "Unknown" } else { &grid_data.country }.to_string(),
|
||||
node_type: "3Node".to_string(),
|
||||
node_type: "MyceliumNode".to_string(),
|
||||
slice_formats: if slice_formats.is_empty() { None } else { Some(slice_formats.clone()) },
|
||||
rental_options: rental_options.map(|ro| serde_json::to_value(&ro).unwrap_or_default()),
|
||||
staking_options: None,
|
||||
@@ -2560,7 +2560,7 @@ impl FarmerService {
|
||||
last_seen: Some(Utc::now()),
|
||||
health_score: 100.0,
|
||||
region: if grid_data.country.is_empty() { "Unknown".to_string() } else { grid_data.country.clone() },
|
||||
node_type: "3Node".to_string(),
|
||||
node_type: "MyceliumNode".to_string(),
|
||||
slice_formats: None,
|
||||
rental_options: {
|
||||
let rental_opts = crate::models::user::NodeRentalOptions {
|
||||
@@ -2660,7 +2660,7 @@ impl FarmerService {
|
||||
last_seen: Some(Utc::now()),
|
||||
health_score: 100.0,
|
||||
region: if grid_data.country.is_empty() { "Unknown".to_string() } else { grid_data.country.clone() },
|
||||
node_type: "3Node".to_string(),
|
||||
node_type: "MyceliumNode".to_string(),
|
||||
slice_formats: None,
|
||||
rental_options: Some(serde_json::to_value(&crate::models::user::NodeRentalOptions {
|
||||
full_node_available: enable_full_node_rental,
|
||||
|
||||
Reference in New Issue
Block a user