Repository navigation
[QA] remove some magic mining constants in functional tests - #15238
Merged
Merged
Conversation
instagibbs
force-pushed
the
magic_miner
branch
from
January 23, 2019 16:12
20c0bdb to
d4a2b9e
Compare
laanwj
reviewed
Jan 24, 2019
instagibbs
force-pushed
the
magic_miner
branch
2 times, most recently
from
January 24, 2019 14:46
15b0e3c to
d37b1c3
Compare
instagibbs
force-pushed
the
magic_miner
branch
from
January 24, 2019 14:48
d37b1c3 to
b651ef7
Compare
Member
|
utACK b651ef7 |
Contributor
|
utACK b651ef7 |
maflcko
pushed a commit
to maflcko/bitcoin-core
that referenced
this pull request
Feb 12, 2019
…ional tests b651ef7 submitheader: more directly test missing prev block header (Gregory Sanders) 1e7f741 remove some magic mining constants in functional tests (Gregory Sanders) Pull request description: The fewer magic numbers the better. Also more directly tested a `submitheader` case of bad previous blockhash. Tree-SHA512: 52b01a6aa199fa909eea4e9e84409a901933e545724e33149cc4132c82168199fd678809b6d94d95c9ff6ad02238a9552363620d13b8beaa5d4b67ade9ef425c
maflcko
reviewed
Feb 12, 2019
| from test_framework.messages import ( | ||
| CBlock, | ||
| CBlockHeader, | ||
| BLOCK_HEADER_SIZE |
Member
There was a problem hiding this comment.
style-nit: Missing trailing , 👀
AkioNak
reviewed
Feb 18, 2019
| assert_raises_rpc_error(-25, 'Must submit previous header', lambda: node.submitheader(hexdata='ff' * 80)) | ||
| assert_raises_rpc_error(-22, 'Block header decode failed', lambda: node.submitheader(hexdata='xx' * BLOCK_HEADER_SIZE)) | ||
| assert_raises_rpc_error(-22, 'Block header decode failed', lambda: node.submitheader(hexdata='ff' * (BLOCK_HEADER_SIZE-2))) | ||
| assert_raises_rpc_error(-25, 'Must submit previous header', lambda: node.submitheader(hexdata=super(CBlock, bad_block).serialize().hex())) |
Contributor
There was a problem hiding this comment.
Currentry, minimum required version of Python (test) is 3.4.
https://github.com/bitcoin/bitcoin/blob/master/doc/dependencies.md
But hex() seems to be introdued in Python 3.5.
https://docs.python.org/3.5/library/stdtypes.html?highlight=bytes%20hex#bytes.hex
I got following error when executing this test on Python3.4.
AttributeError: 'bytes' object has no attribute 'hex'
Member
deadalnix
pushed a commit
to Bitcoin-ABC/bitcoin-abc
that referenced
this pull request
Oct 2, 2020
Summary: Backport of Core [[bitcoin/bitcoin#15238 | PR15238]] Test Plan: `ninja && ./test/functional/test_runner.py interface_rest mining_basic` Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien Subscribers: Fabien Differential Revision: https://reviews.bitcoinabc.org/D7714
vijaydasmp
pushed a commit
to vijaydasmp/dash
that referenced
this pull request
Sep 12, 2021
…ional tests b651ef7 submitheader: more directly test missing prev block header (Gregory Sanders) 1e7f741 remove some magic mining constants in functional tests (Gregory Sanders) Pull request description: The fewer magic numbers the better. Also more directly tested a `submitheader` case of bad previous blockhash. Tree-SHA512: 52b01a6aa199fa909eea4e9e84409a901933e545724e33149cc4132c82168199fd678809b6d94d95c9ff6ad02238a9552363620d13b8beaa5d4b67ade9ef425c
vijaydasmp
pushed a commit
to vijaydasmp/dash
that referenced
this pull request
Sep 13, 2021
…ional tests b651ef7 submitheader: more directly test missing prev block header (Gregory Sanders) 1e7f741 remove some magic mining constants in functional tests (Gregory Sanders) Pull request description: The fewer magic numbers the better. Also more directly tested a `submitheader` case of bad previous blockhash. Tree-SHA512: 52b01a6aa199fa909eea4e9e84409a901933e545724e33149cc4132c82168199fd678809b6d94d95c9ff6ad02238a9552363620d13b8beaa5d4b67ade9ef425c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fewer magic numbers the better.
Also more directly tested a
submitheadercase of bad previous blockhash.