-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Bugfix: RPC/Mining: Use pre-segwit sigops and limits, when working with non-segwit GBT clients #10595
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
Conversation
utACK 4292a75 |
4292a75
to
e36493b
Compare
Rebased. At this point, it might make sense to just drop support for pre-segwit miners, but this fix is simple, so it makes sense to get in (and backportable) first. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that we should just drop support for non-segwit miners at this point. Doesn't seem worth the trouble of making this change.
test/functional/feature_segwit.py
Outdated
@@ -225,6 +225,13 @@ def run_test(self): | |||
# Now try calling getblocktemplate() without segwit support. | |||
template = self.nodes[0].getblocktemplate() | |||
|
|||
# Check that we got a pre-Segwit template | |||
assert(template['sizelimit'] == 1000000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: prefer assert_equal()
for asserting equality
test/functional/feature_segwit.py
Outdated
@@ -225,6 +225,13 @@ def run_test(self): | |||
# Now try calling getblocktemplate() without segwit support. | |||
template = self.nodes[0].getblocktemplate() | |||
|
|||
# Check that we got a pre-Segwit template | |||
assert(template['sizelimit'] == 1000000) | |||
assert('weightlimit' not in template) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: assert is a statement, not a function. Please remove parens.
…th non-segwit GBT clients
e36493b
to
a5464ad
Compare
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
This has been "fixed" by
|
Needs rebase |
No description provided.