don't delete VMs if node is offline for < 1day

This commit is contained in:
ghe0 2025-02-28 00:37:34 +02:00
parent 02be48fd96
commit 64b65d7ecd
Signed by: ghe0
GPG Key ID: 451028EE56A0FBB4

@ -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);