util: Require explicit Span in serialize #27925

pull maflcko wants to merge 2 commits into bitcoin:master from maflcko:2306-ser-span- changing 2 files +5 −4
  1. maflcko commented at 9:43 am on June 21, 2023: member

    The serialize code already requires unsigned char-holding containers, which can be serialized as-is, but should be serialized as Span (that is, without the length serialized), to be explicitly converted to Span. However, for unsigned char-holding containers that can not be serialized as-is, because their serialize-overload is missing, this requirement wasn’t there.

    Fix this by requiring all Byte-Span serializations to be explicit.

  2. test: Use shorter explicit Span construction
    AsBytes requires the call site to explicitly pass a Span. The shortest
    and clearest way to do this is by using the Span{...} constructor here.
    fa6f842642
  3. Require explicit Span in serialize fac2a3350b
  4. DrahtBot commented at 9:44 am on June 21, 2023: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Reviews

    See the guideline for information on the review process. A summary of reviews will appear here.

  5. DrahtBot renamed this:
    Require explicit Span in serialize
    Require explicit Span in serialize
    on Jun 21, 2023
  6. maflcko renamed this:
    Require explicit Span in serialize
    util: Require explicit Span in serialize
    on Jun 21, 2023
  7. DrahtBot added the label Utils/log/libs on Jun 21, 2023
  8. maflcko commented at 10:14 am on June 21, 2023: member
    Sorry for the noise. This is already the case on master, so no need for changes. See #27790 (review)
  9. maflcko closed this on Jun 21, 2023

  10. maflcko deleted the branch on Jun 21, 2023
  11. bitcoin locked this on Jun 20, 2024

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-26 12:12 UTC

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