diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2015-06-19 10:42:39 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2015-06-24 15:18:55 -0400 |
commit | 6a4b97e8633c64593d7d0c9bd18079e52bc03e82 (patch) | |
tree | 518903d0d15fc2614e4b5ad51d8687a15160206f /src/init.cpp | |
parent | 91389e51c78ae3565b037e31dd5382b52bd75136 (diff) |
Testing infrastructure: mocktime fixes
New, undocumented-on-purpose -mocktime=timestamp command-line
argument to startup with mocktime set. Needed because
time-related blockchain sanity checks are done on startup, before a
test has a chance to make a setmocktime RPC call.
And changed the setmocktime RPC call so calling it will not result in
currently connected peers being disconnected due to inactivity timeouts.
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/init.cpp b/src/init.cpp index bcdd1f2f3d..c4e3573de3 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -868,6 +868,9 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler) fAlerts = GetBoolArg("-alerts", DEFAULT_ALERTS); + // Option to startup with mocktime set (used for regression testing): + SetMockTime(GetArg("-mocktime", 0)); // SetMockTime(0) is a no-op + // ********************************************************* Step 4: application initialization: dir lock, daemonize, pidfile, debug log // Initialize elliptic curve code |