Current GetDifficulty has a divergent history from core, time to patch
We missed a couple backports:
Then in D619, we simplified the logic of GetDifficulty in a nice way.
Core would later do the same:
But they had also added some tests in the meantime:
This diff brings back basically into sync with core:
- get tests
- remove GetDifficultyFromBits function that isn't used elsewhere
- and most importantly -- have less code ownership
It can't be simply done with revert-backport-backport-backport-backport so
I'm doing a snapshot update.
Depends on D3021