HomePhabricator

refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)

Description

refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)

Summary:

HexStr can be called with anything that bas begin() and end() functions,
so clean up the redundant calls.

(context: I tried to convert HexStr to use span, but this turns out to
be somewhat more involved than I thought, because of the limitation to
pre-c++17 Span lacking iterator-based constructor) . This commit is a
first step which stands on its own though)

Backport of core PR19373.

Test Plan:

ninja all check-all

ninja bitcoin-fuzzers
./test/fuzz/test_runner.py <path_to_corpus>

Reviewers: #bitcoin_abc, PiRK

Reviewed By: #bitcoin_abc, PiRK

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

Details

Provenance
Wladimir J. van der Laan <laanwj@protonmail.com>Authored on Jun 24 2020, 13:48
FabienCommitted on Feb 1 2021, 15:16
FabienPushed on Feb 1 2021, 15:17
Reviewer
Restricted Project
Differential Revision
D9122: refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)
Parents
rABCdb8ba865274d: tests: Add fuzzing harness for {Read,Write}{LE,BE}{16,32,64} (crypto/common.h)
Branches
Unknown
Tags
Unknown