HomePhabricator

refactor: Treat CDataStream bytes as uint8_t

Description

refactor: Treat CDataStream bytes as uint8_t

Summary:
Using uint8_t for raw bytes has a style benefit:

  • The signedness is clear from reading the code, as it does not depend on the architecture

Other clean-ups in this pull include:

  • Remove unused methods
  • Constructor is simplified with Span
  • Remove Init() member in favor of C++11 member initialization

Notes:

  • the += operatior is not unused in our codebase
  • the seeder code needs minor adjustments to use the Span constructor

This is a backport of core#20464

Test Plan: ninja all check-all bench-bitcoin bitcoin-fuzzers

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D14689

Details

Provenance
MarcoFalke <falke.marco@gmail.com>Authored on Nov 23 2020, 14:22
PiRKCommitted on Oct 27 2023, 06:19
PiRKPushed on Oct 27 2023, 06:19
Reviewer
Restricted Project
Differential Revision
D14689: refactor: Treat CDataStream bytes as uint8_t
Parents
rABC62a837e56827: [alias-server] Return pending registrations for a specified alias
Branches
Unknown
Tags
Unknown
Reverted By
D14867: Revert "refactor: Treat CDataStream bytes as uint8_t"