SetHex()
and GetHex()
in base_uint
use arith_uint256
’s implementations. Which means, any attempt to create anything other than arith_uint256
(say arith_uint512
) and using any of these functions (which is what I needed in my application) will just not work and will cause compilation errors (besides the immediate linking errors due to templates being in source files instantiated only for 256) because there’s no viable conversion from arith_uint256
and any of the other possible types. Besides that these function will yield wrong results even if the conversion is possible depending on the size. This is fixed in this PR.