Bump missing threshold to a weak inequality

When strict testnet *always* has to go out for help because the
threshold ends up at 0 (after integer division).
This commit is contained in:
Jason Rhinelander 2021-05-25 18:30:30 -03:00
parent e644959f83
commit bbcb1e00c3

View file

@ -655,7 +655,7 @@ void ServiceNode::update_swarms() {
auto [missing, total] = count_missing_data(bu);
if (total >= (oxen::is_mainnet ? 100 : 10)
&& missing <
&& missing <=
MISSING_PUBKEY_THRESHOLD::num*total/MISSING_PUBKEY_THRESHOLD::den) {
OXEN_LOG(info, "Initialized from oxend with {}/{} SN records",
total-missing, total);