mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-05 11:28:49 +02:00
test: Fix off-by-one in mockscheduler test RPC
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
#include <scheduler.h>
|
||||
|
||||
#include <random.h>
|
||||
#include <util/time.h>
|
||||
|
||||
#include <assert.h>
|
||||
#include <functional>
|
||||
@@ -80,7 +81,7 @@ void CScheduler::schedule(CScheduler::Function f, std::chrono::system_clock::tim
|
||||
|
||||
void CScheduler::MockForward(std::chrono::seconds delta_seconds)
|
||||
{
|
||||
assert(delta_seconds.count() > 0 && delta_seconds < std::chrono::hours{1});
|
||||
assert(delta_seconds > 0s && delta_seconds <= 1h);
|
||||
|
||||
{
|
||||
LOCK(newTaskMutex);
|
||||
|
||||
Reference in New Issue
Block a user