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. sipa cross-referenced this on Dec 6, 2021 from issue Generalize/simplify VectorReader into SpanReader by sipa
  3. 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
  4. sipa force-pushed on Dec 6, 2021
  5. DrahtBot added the label Wallet on Dec 6, 2021
  6. jb55 approved
  7. jb55 commented at 12:20 AM on December 7, 2021: contributor

    crACK 31ba1af74a0aaec690a01ea061264a6d5039d885

    <!-- review by re -->

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

    ACK 31ba1af74a0aaec690a01ea061264a6d5039d885

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

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

    Post merge ACK 31ba1af74a0aaec690a01ea061264a6d5039d885

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

    Posthumous utACK 31ba1af74a0aaec690a01ea061264a6d5039d885

  16. RandyMcMillan referenced this in commit 3aa0c2ac7b on Dec 23, 2021
  17. bitcoin 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-05-20 06:53 UTC