Records: In init_range, set finished to false, if there are contacts

This commit is contained in:
H1ghBre4k3r 2021-05-03 21:39:46 +02:00 committed by Patrick Rathje
parent 33f64b1caa
commit 30615a895d
1 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,8 @@ int ens_records_iterator_init_range(record_iterator_t* iterator,
iterator->sn_end = opt_end ? *opt_end : get_latest_sequence_number();
if (get_num_contacts() == 0) {
iterator->finished = true; // no contacts -> no iteration :)
} else {
iterator->finished = false;
}
return 0;
}