pub fn best_fork_index(forks: &[Fork]) -> Result<usize>
Expand description

Auxiliary function to find best ranked fork. The best ranked fork is the one with the highest sum of its blocks squared mining target distances, from max 32 bytes int. In case of a tie, the fork with the highest sum of its blocks squared RandomX hash number distances, from max 32 bytes int, wins.