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
  1. MarcoFalke commented at 12:57 PM on November 1, 2021: member

    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.

  2. 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.
    fa93ef5a8a
  3. MarcoFalke force-pushed on Nov 1, 2021
  4. DrahtBot added the label Refactoring on Nov 1, 2021
  5. DrahtBot added the label RPC/REST/ZMQ on Nov 1, 2021
  6. DrahtBot added the label Utils/log/libs on Nov 1, 2021
  7. DrahtBot added the label Wallet on Nov 1, 2021
  8. MarcoFalke removed the label RPC/REST/ZMQ on Nov 1, 2021
  9. MarcoFalke removed the label Utils/log/libs on Nov 1, 2021
  10. sipa commented at 3:21 PM on November 1, 2021: member

    utACK fa93ef5a8aeae36304c792697a78af2d07fd9f41

  11. 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.

  12. 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::span doesn't offer comparison operations (like operator==), i.e. we'll have to implement them ourselves as soon as we switch from Span to std::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 time

  13. theStack approved
  14. theStack commented at 12:21 PM on November 5, 2021: member

    Code-review ACK fa93ef5a8aeae36304c792697a78af2d07fd9f41

  15. laanwj commented at 11:48 AM on November 8, 2021: member

    Code review ACK fa93ef5a8aeae36304c792697a78af2d07fd9f41

  16. laanwj referenced this in commit aecc08f62e on Nov 8, 2021
  17. laanwj commented at 11:59 AM on November 8, 2021: member

    Closing manually because github doesn't seem to do it automatically.

  18. laanwj closed this on Nov 8, 2021

  19. MarcoFalke deleted the branch on Nov 8, 2021
  20. sidhujag referenced this in commit f7d9813d9e on Nov 8, 2021
  21. DrahtBot locked this on Nov 8, 2022

github-metadata-mirror

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

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me