| 72 | } |
| 73 | |
| 74 | void Seed(FastRandomContext& ctx) |
| 75 | { |
| 76 | // Should be enough to get the seed once for the process |
| 77 | static uint256 seed{}; |
| 78 | static const std::string RANDOM_CTX_SEED{"RANDOM_CTX_SEED"}; |
| 79 | if (seed.IsNull()) seed = GetUintFromEnv(RANDOM_CTX_SEED); |
| 80 | if (seed.IsNull()) seed = GetRandHash(); |
| 81 | LogPrintf("%s: Setting random seed for current tests to %s=%s\n", __func__, RANDOM_CTX_SEED, seed.GetHex()); |
| 82 | ctx = FastRandomContext(seed); |
| 83 | } |
| 84 | |
| 85 | std::ostream& operator<<(std::ostream& os, const uint256& num) |
| 86 | { |
no test coverage detected