fixed overflows in block reward calculations on 32-bit platforms, unit tests updated