[0.14 backport] Don’t require segwit in getblocktemplate for segwit signalling or mining #10006

pull sdaftuar wants to merge 2 commits into bitcoin:0.14 from sdaftuar:backport-9955 changing 6 files +73 −27
  1. sdaftuar commented at 1:43 am on March 16, 2017: member
    Backport of #9955 to the 0.14 branch (all conflicts were in segwit.py).
  2. gmaxwell approved
  3. gmaxwell commented at 4:03 am on March 16, 2017: contributor
    ACK (I have tested but not tested the tests.)
  4. fanquake added this to the milestone 0.14.1 on Mar 16, 2017
  5. fanquake added the label Backport on Mar 16, 2017
  6. fanquake added the label Mining on Mar 16, 2017
  7. laanwj commented at 10:32 am on March 16, 2017: member
    utACK, though please add backport metadata Github-Pull: and Rebased-From: in the commit message (e.g. see https://github.com/bitcoin/bitcoin/commit/8dee97f98253c7d7a5219f4ab0d0e6e9bec0dcef)
  8. Don't require segwit in getblocktemplate for segwit signalling or mining
    Segwit's version bit will be signalled for all invocations of CreateNewBlock,
    and not specifying segwit only will cause CreateNewBlock to skip transactions
    with witness from being selected.
    
    Github-Pull: #9955
    Rebased-From: abe7b3d3abe10e3554b770f40824174b3b217490
    569596cc51
  9. Test transaction selection when gbt called without segwit support
    Github-Pull: #9955
    Rebased-From: c85ffe6d8d57132c1825c16a572d3847419030a6
    2cd2cd51f7
  10. sdaftuar force-pushed on Mar 16, 2017
  11. sdaftuar commented at 2:54 pm on March 16, 2017: member
    @laanwj Thanks, I updated the commit messages.
  12. in qa/rpc-tests/p2p-segwit.py:1706 in 2cd2cd51f7
    1700@@ -1701,9 +1701,11 @@ def test_getblocktemplate_before_lockin(self):
    1701         for node in [self.nodes[0], self.nodes[2]]:
    1702             gbt_results = node.getblocktemplate()
    1703             block_version = gbt_results['version']
    1704-            # If we're not indicating segwit support, we should not be signalling
    1705-            # for segwit activation, nor should we get a witness commitment.
    1706-            assert_equal(block_version & (1 << VB_WITNESS_BIT), 0)
    1707+            # If we're not indicating segwit support, we will still be
    1708+            # signalling for segwit activation.
    1709+            assert_equal((block_version & (1 << VB_WITNESS_BIT) != 0), node == self.nodes[0])
    


    earonesty commented at 11:07 am on March 17, 2017:
    extra parens so it’s clear that & happens before !=

    MarcoFalke commented at 6:43 pm on March 17, 2017:
    Note: This is a backport, so it is too late to fix style issues.

    TheBlueMatt commented at 7:38 pm on March 17, 2017:
    Feel free to fix style issues in a new PR against master, though.
  13. earonesty changes_requested
  14. laanwj merged this on Mar 18, 2017
  15. laanwj closed this on Mar 18, 2017

  16. laanwj referenced this in commit ccb47bf830 on Mar 18, 2017
  17. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-12-03 15:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me