Use WitnessV0KeyHash in TestAddAddressesToSendBook

This commit is contained in:
MarcoFalke
2025-05-19 14:27:07 +02:00
parent ff1ee102c4
commit fa982f1425

View File

@ -1,4 +1,4 @@
// Copyright (c) 2017-2022 The Bitcoin Core developers // Copyright (c) 2017-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying // Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
@ -85,8 +85,7 @@ void TestAddAddressesToSendBook(interfaces::Node& node)
} }
auto build_address{[]() { auto build_address{[]() {
CKey key = GenerateRandomKey(); const WitnessV0KeyHash dest{GenerateRandomKey().GetPubKey()};
const PKHash dest{key.GetPubKey()};
return std::make_pair(dest, QString::fromStdString(EncodeDestination(dest))); return std::make_pair(dest, QString::fromStdString(EncodeDestination(dest)));
}}; }};