Skip to content

Improve versionbits_computeblockversion test code consistency#11160

Merged
maflcko merged 1 commit intobitcoin:masterfrom
danra:patch-9
Aug 27, 2017
Merged

Improve versionbits_computeblockversion test code consistency#11160
maflcko merged 1 commit intobitcoin:masterfrom
danra:patch-9

Conversation

@danra
Copy link
Copy Markdown
Contributor

@danra danra commented Aug 26, 2017

In this test, nTime is used for all the calls to Mine(), each time being set to the correct time beforehand, except for in the last few calls to Mine() where nStartTime is used directly, even though nTime is still set to nStartTime beforehand. nTime just remains unused for these last few calls to Mine().

Changed the last few calls to Mine() to use nTime instead, improving consistency. This also fixes an unused value static analyzer warning about nTime being set to a value which is never used.

@promag
Copy link
Copy Markdown
Contributor

promag commented Aug 26, 2017

PR title longer than the patch :trollface:

@danra
Copy link
Copy Markdown
Contributor Author

danra commented Aug 26, 2017

looks like a spurious failure, please rerun

@fanquake fanquake added the Tests label Aug 27, 2017
@sipa
Copy link
Copy Markdown
Member

sipa commented Aug 27, 2017

utACK 81d4f3c50c505afe2f8352f8614c6490e3b65699, but can you use a shorter commit title (the first line of the commit message is treated specially, and shouldn't be too long, as it goes into release notes etc).

In this test, `nTime` is used for all the calls to `Mine()`, each time being set to the correct time beforehand, except for in the last few calls to `Mine()` where `nStartTime` is used directly, even though `nTime` is still set to `nStartTime` beforehand. `nTime` just remains unused for these last few calls to `Mine()`.

Changed the last few calls to `Mine()` to use `nTime` instead, improving consistency. This also fixes an unused value static analyzer warning about `nTime` being set to a value which is never used.
@danra danra changed the title Tests: Improve versionbits_computeblockversion test code consistency and fix… Improve versionbits_computeblockversion test code consistency Aug 27, 2017
@danra
Copy link
Copy Markdown
Contributor Author

danra commented Aug 27, 2017

@promag @sipa Shortened title :)

@maflcko
Copy link
Copy Markdown
Member

maflcko commented Aug 27, 2017

utACK 946638d

@maflcko maflcko merged commit 946638d into bitcoin:master Aug 27, 2017
maflcko pushed a commit that referenced this pull request Aug 27, 2017
…stency

946638d Improve versionbits_computeblockversion test code consistency (danra)

Pull request description:

  In this test, `nTime` is used for all the calls to `Mine()`, each time being set to the correct time beforehand, except for in the last few calls to `Mine()` where `nStartTime` is used directly, even though `nTime` is still set to `nStartTime` beforehand. `nTime` just remains unused for these last few calls to `Mine()`.

  Changed the last few calls to `Mine()` to use `nTime` instead, improving consistency. This also fixes an unused value static analyzer warning about `nTime` being set to a value which is never used.

Tree-SHA512: f17cf1d29fd7097d53c0135d6357ee50943bd81b5ce0be785a37b85d34b5127cd6cc17ef844b519e19c33f2d96f7ababee643b9fba7afb031f444b2cfaeedbfd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Dec 9, 2019
…e consistency

946638d Improve versionbits_computeblockversion test code consistency (danra)

Pull request description:

  In this test, `nTime` is used for all the calls to `Mine()`, each time being set to the correct time beforehand, except for in the last few calls to `Mine()` where `nStartTime` is used directly, even though `nTime` is still set to `nStartTime` beforehand. `nTime` just remains unused for these last few calls to `Mine()`.

  Changed the last few calls to `Mine()` to use `nTime` instead, improving consistency. This also fixes an unused value static analyzer warning about `nTime` being set to a value which is never used.

Tree-SHA512: f17cf1d29fd7097d53c0135d6357ee50943bd81b5ce0be785a37b85d34b5127cd6cc17ef844b519e19c33f2d96f7ababee643b9fba7afb031f444b2cfaeedbfd
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jan 2, 2020
…e consistency

946638d Improve versionbits_computeblockversion test code consistency (danra)

Pull request description:

  In this test, `nTime` is used for all the calls to `Mine()`, each time being set to the correct time beforehand, except for in the last few calls to `Mine()` where `nStartTime` is used directly, even though `nTime` is still set to `nStartTime` beforehand. `nTime` just remains unused for these last few calls to `Mine()`.

  Changed the last few calls to `Mine()` to use `nTime` instead, improving consistency. This also fixes an unused value static analyzer warning about `nTime` being set to a value which is never used.

Tree-SHA512: f17cf1d29fd7097d53c0135d6357ee50943bd81b5ce0be785a37b85d34b5127cd6cc17ef844b519e19c33f2d96f7ababee643b9fba7afb031f444b2cfaeedbfd
@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.

5 participants