diff options
| author | MarcoFalke <[email protected]> | 2020-06-24 14:24:03 -0400 |
|---|---|---|
| committer | MarcoFalke <[email protected]> | 2020-06-24 14:24:14 -0400 |
| commit | 532b134cb0d0887a14fe79c2a2604498921caf6f (patch) | |
| tree | 0aa7480acb3fa0162f49ab989bd40a8274acffe0 /src/test/fuzz | |
| parent | Merge #19357: doc: add release note for bitcoin-cli -generate (diff) | |
| parent | refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) (diff) | |
| download | discoin-532b134cb0d0887a14fe79c2a2604498921caf6f.tar.xz discoin-532b134cb0d0887a14fe79c2a2604498921caf6f.zip | |
Merge #19373: refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o)
bd93e32292c96b671e71223032ff8f660ce27c5d refactor: Replace HexStr(o.begin(), o.end()) with HexStr(o) (Wladimir J. van der Laan)
Pull request description:
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)
ACKs for top commit:
jonatack:
ACK bd93e32292c96b671e71223032ff8f660ce27c5d
troygiorshev:
ACK bd93e32292c96b671e71223032ff8f660ce27c5d
MarcoFalke:
review ACK bd93e32292c96b671e71223032ff8f660ce27c5d 🔌
Tree-SHA512: 7e4c9d0259b8d23271d233095f1c51db1ee021e865361d74c05c10dd5129aa6d34a243323e2b4596d648e2d7b25c7ebdee37a3e4f99a27883cb4c3cd26432b08
Diffstat (limited to 'src/test/fuzz')
| -rw-r--r-- | src/test/fuzz/decode_tx.cpp | 2 | ||||
| -rw-r--r-- | src/test/fuzz/key.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/decode_tx.cpp b/src/test/fuzz/decode_tx.cpp index 09c4ff05d..0d89d4228 100644 --- 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.begin(), buffer.end()}); + const std::string tx_hex = HexStr(buffer); CMutableTransaction mtx; const bool result_none = DecodeHexTx(mtx, tx_hex, false, false); const bool result_try_witness = DecodeHexTx(mtx, tx_hex, false, true); diff --git a/src/test/fuzz/key.cpp b/src/test/fuzz/key.cpp index 1919a5f88..58735545c 100644 --- a/src/test/fuzz/key.cpp +++ b/src/test/fuzz/key.cpp @@ -108,7 +108,7 @@ void test_one_input(const std::vector<uint8_t>& buffer) assert(pubkey.IsCompressed()); assert(pubkey.IsValid()); assert(pubkey.IsFullyValid()); - assert(HexToPubKey(HexStr(pubkey.begin(), pubkey.end())) == pubkey); + assert(HexToPubKey(HexStr(pubkey)) == pubkey); assert(GetAllDestinationsForKey(pubkey).size() == 3); } |