Remove unused (and broken) functionality in SpanReader #23687

pull sipa wants to merge 1 commits into bitcoin:master from sipa:202112_spanreadernopos changing 8 files +16 −35
  1. sipa commented at 8:49 PM on December 6, 2021: member

    This removes the ability to set an offset in the SpanReader::SpanReader constructor, as the current code is broken since #23653. All call sites use pos=0, so it is actually unused. If future call sites need it, SpanReader{a, b, c, d} is equivalent to SpanReader{a, b, c.subspan(d)}.

    It also removes the ability to deserialize from SpanReader directly from the constructor. This too is unused, and can be more idiomatically simulated using (SpanReader{a, b, c} >> x >> y >> z) instead of SpanReader{a, b, c, x, y, z}.

    This was pointed out by achow101 in #23653 (review).

  2. Remove unused (and broken) functionality in SpanReader
    This removes the ability to set an offset in the SpanReader constructor,
    as the current code is broken. All call sites use pos=0, so it is actually
    unused. If future call sites need it, SpanReader{a, b, c, d} is equivalent
    to SpanReader{a, b, c.subspan(d)}.
    
    It also removes the ability to deserialize from SpanReader directly from
    the constructor. This too is unused, and can be more idiomatically
    simulated using (SpanReader{a, b, c} >> x >> y >> z) instead of
    SpanReader{a, b, c, x, y, z}.
    31ba1af74a
  3. sipa force-pushed on Dec 6, 2021
  4. DrahtBot added the label Wallet on Dec 6, 2021
  5. jb55 approved
  6. jb55 commented at 12:20 AM on December 7, 2021: member

    crACK 31ba1af74a0aaec690a01ea061264a6d5039d885

    <!-- review by re -->

  7. fanquake requested review from MarcoFalke on Dec 7, 2021
  8. fanquake requested review from achow101 on Dec 7, 2021
  9. achow101 commented at 4:42 AM on December 7, 2021: member

    ACK 31ba1af74a0aaec690a01ea061264a6d5039d885

  10. MarcoFalke merged this on Dec 7, 2021
  11. MarcoFalke closed this on Dec 7, 2021

  12. shaavan commented at 12:26 PM on December 7, 2021: contributor

    Post merge ACK 31ba1af74a0aaec690a01ea061264a6d5039d885

  13. sidhujag referenced this in commit 82cf06c9e2 on Dec 7, 2021
  14. jonatack commented at 5:48 PM on December 7, 2021: member

    Posthumous utACK 31ba1af74a0aaec690a01ea061264a6d5039d885

  15. RandyMcMillan referenced this in commit 3aa0c2ac7b on Dec 23, 2021
  16. DrahtBot locked this on Dec 7, 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-19 09:13 UTC

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