Missing blockhash prefix (0x) for Testnet and Regtest #20124

pull decryp2kanon wants to merge 1 commits into bitcoin:master from decryp2kanon:master changing 1 files +2 −2
  1. decryp2kanon commented at 10:15 PM on October 11, 2020: contributor

    Its checkpoint validation is working even with no prefix, because base_blob<BITS>::SetHex. However I guess this PR is right way and for code consistency like Mainnet.

    https://github.com/bitcoin/bitcoin/blob/0b2abaa666d6f3331e3246ffd64dd47946e9dcdf/src/chainparams.cpp#L146

  2. Add blockhash prefix (0x) for Testnet and Regtest f195085415
  3. DrahtBot added the label Validation on Oct 11, 2020
  4. promag commented at 12:20 AM on October 12, 2020: member

    ACK, change is correct (0x prefix is skipped in base_blob<BITS>::SetHex). No strong opinion whether this should be merged or not only because of code consistency.

  5. decryp2kanon renamed this:
    Add blockhash prefix (0x) for Testnet and Regtest
    Missing blockhash prefix (0x) for Testnet and Regtest
    on Oct 12, 2020
  6. laanwj commented at 4:17 PM on October 12, 2020: member

    ~0 on this, uint256S takes 0x prefixes for historical reasons but the input is not really a number, it's a hash, a binary blob. Ever since the split with arith_uint256, uint256 is misnamed and simply a 256-bit blob. (but at the time, the rename from uint256 to blob256 wasn't accepted)

    No strong opinion but I don't think this makes anything any clearer.

  7. instagibbs commented at 8:14 AM on January 8, 2021: member

    I actually didn't know that 0x was possible. ~0 on this as well.

  8. MarcoFalke commented at 8:22 AM on January 8, 2021: member

    Closing for now due to controversy

  9. MarcoFalke closed this on Jan 8, 2021

  10. DrahtBot locked this on Aug 16, 2022

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-25 00:14 UTC

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