Extract consts for WITNESS_V0 hash sizes #12939

pull Empact wants to merge 1 commits into bitcoin:master from Empact:hash-size-constants changing 4 files +11 −7
  1. Empact commented at 4:24 AM on April 11, 2018: member

    No description provided.

  2. Extract consts for WITNESS_V0 hash sizes 3450a9b25c
  3. fanquake added the label Refactoring on Apr 11, 2018
  4. practicalswift commented at 10:53 AM on April 11, 2018: contributor

    utACK 3450a9b25cd6dbc69daf946bd3a610681ee61317

  5. MarcoFalke commented at 12:25 PM on April 11, 2018: member

    utACK 3450a9b25cd6dbc69daf946bd3a610681ee61317

  6. sipa commented at 4:18 PM on April 11, 2018: member

    utACK 3450a9b25cd6dbc69daf946bd3a610681ee61317

  7. jnewbery commented at 9:14 PM on April 11, 2018: member

    utACK 3450a9b25cd6dbc69daf946bd3a610681ee61317

  8. laanwj commented at 6:33 AM on April 12, 2018: member
    $ git ls-files | xargs sed -i 's/WITNESS_V0_SCRIPTHASH_SIZE/32/g'
    $ git ls-files | xargs sed -i 's/WITNESS_V0_KEYHASH_SIZE/20/g'
    $ git diff HEAD~1
    
    diff --git a/src/script/interpreter.h b/src/script/interpreter.h
    index bb7750d..6ad84a7 100644
    --- a/src/script/interpreter.h
    +++ b/src/script/interpreter.h
    @@ -129,6 +129,10 @@ enum class SigVersion
         WITNESS_V0 = 1,
     };
     
    +/** Signature hash sizes */
    +static constexpr size_t 32 = 32;
    +static constexpr size_t 20 = 20;
    +
     uint256 SignatureHash(const CScript &scriptCode, const CTransaction& txTo, unsigned int nIn, int nHashType, const CAmount& amount, SigVersion sigversion, const PrecomputedTransactionData* cache = nullptr);
     
     class BaseSignatureChecker
    

    ACK 3450a9b25cd6dbc69daf946bd3a610681ee61317

  9. laanwj merged this on Apr 12, 2018
  10. laanwj closed this on Apr 12, 2018

  11. laanwj referenced this in commit e561cf4fa8 on Apr 12, 2018
  12. Empact deleted the branch on Apr 12, 2018
  13. MarcoFalke 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: 2026-04-22 06:15 UTC

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