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.
This commit is contained in:
MarcoFalke
2021-11-01 13:59:15 +01:00
parent 5574881ce3
commit fa93ef5a8a
7 changed files with 11 additions and 9 deletions

View File

@@ -124,7 +124,7 @@ void RunTest(const TestVector &test) {
std::vector<unsigned char> seed = ParseHex(test.strHexMaster);
CExtKey key;
CExtPubKey pubkey;
key.SetSeed(seed.data(), seed.size());
key.SetSeed(seed);
pubkey = key.Neuter();
for (const TestDerivation &derive : test.vDerive) {
unsigned char data[74];