Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing infrastructure: mocktime fixes #6337

Merged
merged 1 commit into from Jun 29, 2015

Conversation

gavinandresen
Copy link
Contributor

@gavinandresen gavinandresen commented Jun 24, 2015

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.

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.
@laanwj laanwj added the Tests label Jun 25, 2015
@laanwj
Copy link
Member

laanwj commented Jun 25, 2015

utACK

@paveljanik
Copy link
Contributor

paveljanik commented Jun 25, 2015

RPC call setmocktime checks for regtest network, but SetMockTime does not contain such check. When the user adds this argument on !regtest network, mocktime is thus set. Do you want it this way as this is a change to the current status quo where user is not allowed to set mocktime on !regtest networks?

@laanwj
Copy link
Member

laanwj commented Jun 25, 2015

@paveljanik Good catch! (though I have no opinion on whether this is a problem - we don't advertise the parameter anyhow)

@paveljanik
Copy link
Contributor

paveljanik commented Jun 25, 2015

I do not have a problem with this too.
ACK

@laanwj laanwj merged commit 6a4b97e into bitcoin:master Jun 29, 2015
1 check passed
laanwj added a commit that referenced this issue Jun 29, 2015
6a4b97e Testing infrastructure: mocktime fixes (Gavin Andresen)
zkbot added a commit to zcash/zcash that referenced this issue Feb 15, 2017
zkbot added a commit to zcash/zcash that referenced this issue Feb 20, 2017
zkbot added a commit to zcash/zcash that referenced this issue Mar 3, 2017
Bitcoin 0.12 test PRs 1

Cherry-picked from the following upstream PRs:

- bitcoin/bitcoin#6337
- bitcoin/bitcoin#6390
- bitcoin/bitcoin#5515
- bitcoin/bitcoin#6287 (partial, remainder included in bitcoin/bitcoin#6703)
- bitcoin/bitcoin#6465

Part of #2074.
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants