Merge bitcoin/bitcoin#27765: test: Throw error when -signetchallenge is non-hex

fa6b11a556 test: Throw error when -signetchallenge is non-hex (MarcoFalke)

Pull request description:

  Instead of silently parsing non-hex to an empty challenge, throw an error.

  Also, add missing includes while touching the file.

ACKs for top commit:
  kevkevinpal:
    ACK [fa6b11a](fa6b11a556)
  kallewoof:
    ACK fa6b11a
  TheCharlatan:
    Nice, ACK fa6b11a556

Tree-SHA512: 018ebbbf819ba7cdf0c6dd294fdfaa5ddb81b87058a8b9c57b96066d5b07e1656fd78f18e3cef375aebefa191fa515c2c70bc764880fa05f98f526334431a616
This commit is contained in:
fanquake
2023-05-29 10:35:14 +01:00
5 changed files with 22 additions and 23 deletions

View File

@@ -17,8 +17,8 @@
#include <cstdint>
#include <limits>
#include <optional>
#include <string>
#include <string_view>
#include <string> // IWYU pragma: export
#include <string_view> // IWYU pragma: export
#include <system_error>
#include <type_traits>
#include <vector>

View File

@@ -12,8 +12,8 @@
#include <cstring>
#include <locale>
#include <sstream>
#include <string>
#include <string_view>
#include <string> // IWYU pragma: export
#include <string_view> // IWYU pragma: export
#include <vector>
void ReplaceAll(std::string& in_out, const std::string& search, const std::string& substitute);