This commit is contained in:
serinko
2025-09-05 23:44:06 +02:00
parent 248241f438
commit a26bda03e9
+2 -1
View File
@@ -37,9 +37,10 @@ const MAX_PM = 0.2;
function hasRequiredRoles(n: ApiNode): boolean {
const r = n.self_description?.declared_role ?? n.description?.declared_role ?? {};
return r.mixnode === false && !!r.entry && !!r.exit_ipr && !!r.exit_nr;
return r.mixnode === false && !!(r.entry && r.exit_ipr && r.exit_nr);
}
function hasGoodPM(n: ApiNode): boolean {
const pm = toNumber(n.rewarding_details?.cost_params?.profit_margin_percent, NaN);
return !Number.isNaN(pm) && pm <= MAX_PM;