Add AutoFile without ser-type and ser-version and use it where possible #25285

pull MarcoFalke wants to merge 2 commits into bitcoin:master from MarcoFalke:2206-autofile-🌟 changing 19 files +89 −77
  1. MarcoFalke commented at 4:04 PM on June 6, 2022: member

    This was done in the context of #25284 , but I think it also makes sense standalone.

    The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version.

    So do this here for AutoFile. CAutoFile remains in places where it is not yet possible.

  2. laanwj commented at 4:36 PM on June 6, 2022: member

    Concept ACK

  3. DrahtBot added the label Refactoring on Jun 6, 2022
  4. DrahtBot cross-referenced this on Jun 7, 2022 from issue [kernel 3a/n] Decouple `CTxMemPool` from `ArgsManager` by dongcarl
  5. DrahtBot commented at 9:00 AM on June 7, 2022: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

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

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  6. DrahtBot cross-referenced this on Jun 7, 2022 from issue net: Use serialization parameters for CAddress serialization by MarcoFalke
  7. DrahtBot cross-referenced this on Jun 7, 2022 from issue Move minRelayTxFee to policy/settings by MarcoFalke
  8. DrahtBot added the label Needs rebase on Jun 7, 2022
  9. DrahtBot cross-referenced this on Jun 7, 2022 from issue CChainState -> Chainstate by jamesob
  10. MarcoFalke force-pushed on Jun 7, 2022
  11. DrahtBot removed the label Needs rebase on Jun 7, 2022
  12. DrahtBot cross-referenced this on Jun 7, 2022 from issue Allow fee estimation to work with lower fees by ajtowns
  13. DrahtBot cross-referenced this on Jun 21, 2022 from issue Add a `-mempoolfullrbf` node setting by ariard
  14. DrahtBot cross-referenced this on Jun 22, 2022 from issue assumeutxo: add init and completion logic by jamesob
  15. DrahtBot added the label Needs rebase on Jun 29, 2022
  16. streams: Add AutoFile without ser-type and ser-version
    The moved parts can be reviewed with "--color-moved=dimmed-zebra".
    The one-char changes can be reviewed with "--word-diff-regex=.".
    6666803c89
  17. Use AutoFile where possible facc2fa7b8
  18. MarcoFalke force-pushed on Jun 29, 2022
  19. DrahtBot removed the label Needs rebase on Jun 29, 2022
  20. laanwj commented at 9:16 AM on June 29, 2022: member

    Code review ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3 The code change is straightforward and easy to review.

    However, I am not entirely happy about the naming of AutoFile versus CAutoFile I would personally prefer a more distinctive name.

  21. MarcoFalke commented at 9:26 AM on June 29, 2022: member

    However, I am not entirely happy about the naming of AutoFile versus CAutoFile I would personally prefer a more distinctive name.

    CAutoFile is deprecated, only used in two remaining places: addrdb and tx/block serialization, and will be removed as a follow-up to #25284. So I left the name as is, but I am happy to append a scripted-diff here to rename CAutoFile to something else. Maybe LegacyAutoFile?

  22. laanwj commented at 10:04 AM on June 29, 2022: member

    OK, if it's going away soonâ„¢ i have no problem with this. There's something to be said for an intermediate rename, but also there's drawbacks in generating a bigger diff.

    I just imagined it's pretty frustrating for developers to have similarly named classes with slightly different behavior, it's not something to keep on the long run (it reminds me of the situation in net classes naming CAddress / CService / CNetAddr a bit, where, even though i've worked on this code for years keep forgetting what is what).

  23. MarcoFalke requested review from ryanofsky on Jul 19, 2022
  24. fanquake approved
  25. fanquake commented at 8:31 AM on July 20, 2022: member

    ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3

  26. fanquake merged this on Jul 20, 2022
  27. fanquake closed this on Jul 20, 2022

  28. MarcoFalke deleted the branch on Jul 20, 2022
  29. sidhujag referenced this in commit 9dfa0a3e11 on Jul 20, 2022
  30. bitcoin locked this on Jul 20, 2023

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