net: Use mockable time for tx download

This commit is contained in:
MarcoFalke
2019-06-12 15:19:02 -04:00
parent fce4123242
commit fa883ab35a
3 changed files with 42 additions and 32 deletions

View File

@@ -10,7 +10,8 @@
#include <crypto/common.h>
#include <uint256.h>
#include <stdint.h>
#include <chrono> // For std::chrono::microseconds
#include <cstdint>
#include <limits>
/**
@@ -69,6 +70,7 @@
*/
void GetRandBytes(unsigned char* buf, int num) noexcept;
uint64_t GetRand(uint64_t nMax) noexcept;
std::chrono::microseconds GetRandMicros(std::chrono::microseconds duration_max) noexcept;
int GetRandInt(int nMax) noexcept;
uint256 GetRandHash() noexcept;