As block index entries have a flag for marking invalid blocks, the ‘best invalid work’ information can be derived from there. In addition, remove the global from main.h.
Depends on #3077.
As block index entries have a flag for marking invalid blocks, the
'best invalid work' information can be derived from there. In addition,
remove the global from main.h
This means they are declared static, and their extern definition in
main.h is removed. Also moved CBlockIndexWorkComparator to the .cpp
file.