From 64b65d7ecdf020e69263b4cb091ed740f804276c Mon Sep 17 00:00:00 2001 From: ghe0 Date: Fri, 28 Feb 2025 00:37:34 +0200 Subject: [PATCH] don't delete VMs if node is offline for < 1day --- src/data.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data.rs b/src/data.rs index 9f7182e..13e02e0 100644 --- a/src/data.rs +++ b/src/data.rs @@ -277,7 +277,7 @@ impl BrainData { .iter() .filter(|c| c.node_pubkey == node.public_key) { - let compensation = c.price_per_minute() * 24; + let compensation = c.price_per_minute() * 10; if compensation < operator.escrow { operator.escrow -= compensation; self.add_nano_to_wallet(&c.admin_pubkey, compensation); @@ -287,7 +287,7 @@ impl BrainData { } // delete nodes that are offline more than 3 hours, and clean contracts nodes.retain(|n| { - if n.offline_minutes > 180 { + if n.offline_minutes > 1600 { vm_contracts.retain_mut(|c| { if c.node_pubkey == n.public_key { self.add_nano_to_wallet(&c.admin_pubkey, c.locked_nano);