mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
test: Add missing Assert(mock_time_in >= 0s) to SetMockTime
Also, inline the deprecated alias to avoid having the two go out of sync again in the future.
This commit is contained in:
parent
3abee5eceb
commit
fa382d3dd0
1 changed files with 2 additions and 6 deletions
|
@ -29,14 +29,10 @@ NodeClock::time_point NodeClock::now() noexcept
|
|||
return time_point{ret};
|
||||
};
|
||||
|
||||
void SetMockTime(int64_t nMockTimeIn)
|
||||
{
|
||||
Assert(nMockTimeIn >= 0);
|
||||
nMockTime.store(nMockTimeIn, std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
void SetMockTime(int64_t nMockTimeIn) { SetMockTime(std::chrono::seconds{nMockTimeIn}); }
|
||||
void SetMockTime(std::chrono::seconds mock_time_in)
|
||||
{
|
||||
Assert(mock_time_in >= 0s);
|
||||
nMockTime.store(mock_time_in.count(), std::memory_order_relaxed);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue