Fix hard_fork_info rpc returning wrong earliest_height

With multiple forks on the same major version `get_hard_fork_heights`
was returning the last one instead of the first one.
This commit is contained in:
Jason Rhinelander 2021-07-09 02:55:47 -03:00
parent 84f6d08baa
commit 381a3a4ecd
1 changed files with 1 additions and 1 deletions

View File

@ -121,7 +121,7 @@ get_hard_fork_heights(network_type nettype, uint8_t version) {
if (found.first) // Found something suitable in the previous iteration, so one before this hf is the max
found.second = it->height - 1;
break;
} else if (it->version == version) {
} else if (it->version == version && !found.first) {
found.first = it->height;
}
}