A negative chain height is only used to denote an empty chain, not the height of any block.
So stop testing that and remove a suppression.
A negative chain height is only used to denote an empty chain, not the height of any block.
So stop testing that and remove a suppression.
crACK fad81548fa03861c244397201d6b6e6cbf883c38
323 | @@ -324,7 +324,7 @@ BOOST_AUTO_TEST_CASE(updatecoins_simulation_test) 324 | tx.vout.resize(1); 325 | tx.vout[0].nValue = i; //Keep txs unique unless intended to duplicate 326 | tx.vout[0].scriptPubKey.assign(InsecureRand32() & 0x3F, 0); // Random sizes so we can test memory usage accounting 327 | - unsigned int height = InsecureRand32(); 328 | + const int height{int(InsecureRand32() >> 1)};
use we just use GetRandInt from random.h?
Might be better to do this in a separate pull request unrelated from the changes here?
meh, what's the point of a new PR just for that? Probably no-one would review it 😂 imo, it makes much more sense here
GetRandInt is either non-deterministic, or returns a constant (deterministic). Can you explain why either change makes sense? I'd say neither does and it should be left-as is.
Ahh, okay, that's a good reason :) Maybe in the future we should adjust InsecureRand32 to make it clearer that it can be deterministic