Testing infrastructure: mocktime fixes #6337

Merged
merged 1 commit into from Jun 29, 2015

Conversation

Projects
None yet
3 participants
@gavinandresen
Contributor

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.

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.

@laanwj laanwj added the Tests label Jun 25, 2015

@laanwj

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 25, 2015

Member

utACK

Member

laanwj commented Jun 25, 2015

utACK

@paveljanik

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Jun 25, 2015

Contributor

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?

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

This comment has been minimized.

Show comment
Hide comment
@laanwj

laanwj Jun 25, 2015

Member

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

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

This comment has been minimized.

Show comment
Hide comment
@paveljanik

paveljanik Jun 25, 2015

Contributor

I do not have a problem with this too.
ACK

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

continuous-integration/travis-ci/pr The Travis CI build passed
Details

laanwj added a commit that referenced this pull request Jun 29, 2015

Merge pull request #6337
6a4b97e Testing infrastructure: mocktime fixes (Gavin Andresen)

@str4d str4d referenced this pull request in zcash/zcash Feb 14, 2017

Merged

Bitcoin 0.12 test PRs 1 #2101

zkbot added a commit to zcash/zcash that referenced this pull request Feb 15, 2017

zkbot added a commit to zcash/zcash that referenced this pull request Feb 20, 2017

zkbot added a commit to zcash/zcash that referenced this pull request Mar 3, 2017

Auto merge of #2101 - str4d:2074-tests, r=arcalinea
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment