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.
refactor: Take Span in SetSeed #23409
pull MarcoFalke wants to merge 1 commits into bitcoin:master from MarcoFalke:2111-refKey changing 7 files +11 −9-
MarcoFalke commented at 12:57 PM on November 1, 2021: member
-
fa93ef5a8a
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.
- MarcoFalke force-pushed on Nov 1, 2021
- DrahtBot added the label Refactoring on Nov 1, 2021
- DrahtBot added the label RPC/REST/ZMQ on Nov 1, 2021
- DrahtBot added the label Utils/log/libs on Nov 1, 2021
- DrahtBot added the label Wallet on Nov 1, 2021
- MarcoFalke removed the label RPC/REST/ZMQ on Nov 1, 2021
- MarcoFalke removed the label Utils/log/libs on Nov 1, 2021
-
sipa commented at 3:21 PM on November 1, 2021: member
utACK fa93ef5a8aeae36304c792697a78af2d07fd9f41
-
DrahtBot commented at 12:20 AM on November 3, 2021: member
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Conflicts
Reviewers, this pull request conflicts with the following ones:
- #23417 (wallet, spkm: Move key management from DescriptorScriptPubKeyMan to wallet level KeyManager by achow101)
- #22341 (rpc: add getxpub by Sjors)
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
-
in src/test/key_io_tests.cpp:49 in fa93ef5a8a
45 | @@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(key_io_valid_parse) 46 | privkey = DecodeSecret(exp_base58string); 47 | BOOST_CHECK_MESSAGE(privkey.IsValid(), "!IsValid:" + strTest); 48 | BOOST_CHECK_MESSAGE(privkey.IsCompressed() == isCompressed, "compressed mismatch:" + strTest); 49 | - BOOST_CHECK_MESSAGE(privkey.size() == exp_payload.size() && std::equal(privkey.begin(), privkey.end(), exp_payload.begin()), "key mismatch:" + strTest); 50 | + BOOST_CHECK_MESSAGE(Span<const uint8_t>{privkey} == Span<const uint8_t>{exp_payload}, "key mismatch:" + strTest);
theStack commented at 12:21 PM on November 5, 2021:Note that C++20's
std::spandoesn't offer comparison operations (likeoperator==), i.e. we'll have to implement them ourselves as soon as we switch fromSpantostd::span(see e.g. https://brevzin.github.io/c++/2020/03/30/span-comparisons/ for anyone being interested in the topic).
MarcoFalke commented at 12:52 PM on November 5, 2021:Or as alternative, revert this hunk if this is the only use of
operator==at the timetheStack approvedtheStack commented at 12:21 PM on November 5, 2021: memberCode-review ACK fa93ef5a8aeae36304c792697a78af2d07fd9f41
laanwj commented at 11:48 AM on November 8, 2021: memberCode review ACK fa93ef5a8aeae36304c792697a78af2d07fd9f41
laanwj referenced this in commit aecc08f62e on Nov 8, 2021laanwj commented at 11:59 AM on November 8, 2021: memberClosing manually because github doesn't seem to do it automatically.
laanwj closed this on Nov 8, 2021MarcoFalke deleted the branch on Nov 8, 2021sidhujag referenced this in commit f7d9813d9e on Nov 8, 2021DrahtBot locked this on Nov 8, 2022ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-17 06:14 UTC
More mirrored repositories can be found on mirror.b10c.me