refactor: [index] Replace deprecated char with uint8_t in serialization #21824

pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2105-refactorUint8_t changing 4 files +20 −21
  1. MarcoFalke commented at 4:16 pm on May 1, 2021: member
    All char representations are serialized in the same way, however the char one is deprecated according to https://github.com/bitcoin/bitcoin/blob/d22e7ee93313b13365bd14a5fffeb055cff4dcd2/src/serialize.h#L227 . Also, using uint8_t directly avoids casts.
  2. refactor: [index] Replace deprecated char with uint8_t in serialization fafb880e88
  3. DrahtBot added the label Refactoring on May 1, 2021
  4. DrahtBot added the label UTXO Db and Indexes on May 1, 2021
  5. jonatack commented at 7:52 pm on May 1, 2021: member

    Nice change.

    Approach ACK fafb880e8854f9b7fb3934e02a0bd0409aec72c2

  6. kristapsk commented at 10:57 pm on May 1, 2021: contributor

    Concept ACK, char is bad in C++ in general for both it’s undefined default signedness and a lot of people thinking it’s garanteed to be 8-bit, which is not true.

    Haven’t yet looked though all of the code, but shouldn’t char versions of Serialize()/Unserialize() in src/serialize.h be removed too?

  7. practicalswift commented at 7:41 pm on May 2, 2021: contributor
    Concept ACK
  8. laanwj commented at 2:14 pm on May 4, 2021: member
    Code review ACK fafb880e8854f9b7fb3934e02a0bd0409aec72c2 Using explicitly signed/unsigned sized types is clearly superior for serialization purposes
  9. practicalswift commented at 6:37 pm on May 4, 2021: contributor

    cr ACK fafb880e8854f9b7fb3934e02a0bd0409aec72c2: patch looks correct

    uint8_t and uniform initialisation {} make things significantly easier to reason about. Thanks!

  10. fanquake merged this on May 5, 2021
  11. fanquake closed this on May 5, 2021

  12. MarcoFalke deleted the branch on May 5, 2021
  13. sidhujag referenced this in commit 24dc4f4dfb on May 5, 2021
  14. gwillen referenced this in commit 44f58478b0 on Jun 1, 2022
  15. 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: 2024-12-21 15:12 UTC

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