worst_fork_index

Function worst_fork_index 

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

Auxiliary function to find worst ranked fork.

The worst ranked fork is the one with the lowest sum of its blocks squared mining target distances, from max 32 bytes int. In case of a tie, the fork with the lowest sum of its blocks squared RandomX hash number distances, from max 32 bytes int, wins.