1
0

blockchain: fix difficulty retarget

"target" is a 256 bit int, but the "bits" field in the block headers
that is used to represent target is only 32 bits.
We were checking PoW against the untruncated target value, which is a
slightly larger value than the one that can actually be represented,
and hence we would have accepted a slightly lower difficulty chain
than what the consensus requires.
This commit is contained in:
SomberNight
2018-11-22 16:52:51 +01:00
parent 55963bd092
commit a8e6eaa247
2 changed files with 253 additions and 251 deletions

File diff suppressed because it is too large Load Diff