aboutsummaryrefslogtreecommitdiff
path: root/src/test/key_io_tests.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2021-11-01 13:59:15 +0100
committerMarcoFalke <falke.marco@gmail.com>2021-11-01 14:20:56 +0100
commitfa93ef5a8aeae36304c792697a78af2d07fd9f41 (patch)
tree15a20252f07a2c95b9fb52be37a0369a6f5c4c80 /src/test/key_io_tests.cpp
parent5574881ce329f91cc5bbc2b9585860a45fde7c3c (diff)
downloadbitcoin-fa93ef5a8aeae36304c792697a78af2d07fd9f41.tar.xz
refactor: Take Span in SetSeed
This makes calling code less verbose and less fragile. Also, by adding the CKey::data() member function, it is now possible to call HexStr() with a CKey object.
Diffstat (limited to 'src/test/key_io_tests.cpp')
-rw-r--r--src/test/key_io_tests.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/key_io_tests.cpp b/src/test/key_io_tests.cpp
index 8629d13840..0361618c82 100644
--- a/src/test/key_io_tests.cpp
+++ b/src/test/key_io_tests.cpp
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(key_io_valid_parse)
privkey = DecodeSecret(exp_base58string);
BOOST_CHECK_MESSAGE(privkey.IsValid(), "!IsValid:" + strTest);
BOOST_CHECK_MESSAGE(privkey.IsCompressed() == isCompressed, "compressed mismatch:" + strTest);
- BOOST_CHECK_MESSAGE(privkey.size() == exp_payload.size() && std::equal(privkey.begin(), privkey.end(), exp_payload.begin()), "key mismatch:" + strTest);
+ BOOST_CHECK_MESSAGE(Span<const uint8_t>{privkey} == Span<const uint8_t>{exp_payload}, "key mismatch:" + strTest);
// Private key must be invalid public key
destination = DecodeDestination(exp_base58string);