refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)#19373
refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)#19373maflcko merged 1 commit intobitcoin:masterfrom
Conversation
There was a problem hiding this comment.
Nice cleanup.
almost-ACK 282df9029ff138ec1d263e57fcf3373d51929598 modulo when building the fuzzers
test/fuzz/decode_tx.cpp:17:39: error: no matching constructor for initialization of 'std::string' (aka 'basic_string<char>')
const std::string tx_hex = HexStr(std::string{buffer});
^ ~~~~~~~~
HexStr can be called with anything that bas `begin()` and `end()` functions, so clean up the redundant calls.
|
Thanks! |
|
ACK bd93e32
diff --git a/src/test/fuzz/decode_tx.cpp b/src/test/fuzz/decode_tx.cpp
@@ -14,7 +14,7 @@
void test_one_input(const std::vector<uint8_t>& buffer)
{
- const std::string tx_hex = HexStr(std::string{buffer});
+ const std::string tx_hex = HexStr(buffer);recalcitrant fuzzer is back in action |
|
ACK bd93e32 When running all of the fuzz tests, Looking forward to eventually being able to build the fuzz tests at the same time as everything else :) |
|
@troygiorshev maybe |
|
I ran review ACK bd93e32 🔌 Show signature and timestampSignature: Timestamp of file with hash |
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 [[bitcoin/bitcoin#19373 | 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
Merge bitcoin#19660, bitcoin#19373, bitcoin#19841, bitcoin#13862, bitcoin#13866, bitcoin#17280, bitcoin#17682 and partial bitcoin#19326, bitcoin#14978: Auxiliary Backports
HexStr can be called with anything that bas
begin()andend()functions, so clean up the redundant calls.(context: I tried to convert
HexStrto 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)