Fix pulse not avoiding small contributor unlocks

This commit is contained in:
Jason Rhinelander 2022-08-22 19:41:35 -03:00
parent d955607306
commit 2f1e2557ff
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262
1 changed files with 2 additions and 5 deletions

View File

@ -995,11 +995,8 @@ namespace service_nodes
[&unlock](const service_node_info::contribution_t &contribution) {
return unlock.key_image == contribution.key_image;
});
if (cit == contributor.locked_contributions.end())
return false;
if (cit->amount < small_contributor_amount_threshold && (block_height - node_info.registration_height) < service_nodes::SMALL_CONTRIBUTOR_UNLOCK_TIMER)
return true;
if (cit != contributor.locked_contributions.end())
return cit->amount < small_contributor_amount_threshold && (block_height - node_info.registration_height) < service_nodes::SMALL_CONTRIBUTOR_UNLOCK_TIMER;
}
return false;
}