from bitcoin core
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
We store this as (considering the floating point truncation)
0x00000000FFFF0000000000000000000000000000000000000000000000000000
because the above value is not representable by compact target. While the result for both operations is the same and would result in the same block acceptance, I believe the former matches the core semantics better.
I believe this should also be considered a bug as it changes the output of difficulty function. Ideally, we should be able to cross check this operation with other exploerers/implementations.
from bitcoin core
consensus.powLimit = uint256S("00000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffff");We store this as (considering the floating point truncation)
because the above value is not representable by compact target. While the result for both operations is the same and would result in the same block acceptance, I believe the former matches the core semantics better.
I believe this should also be considered a bug as it changes the output of
difficultyfunction. Ideally, we should be able to cross check this operation with other exploerers/implementations.