remove unused GetAllDestinationsForKey

This commit is contained in:
MarcoFalke
2025-05-15 13:42:36 +02:00
parent fa91d57de3
commit fac72fef27
3 changed files with 4 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2022 The Bitcoin Core developers
// Copyright (c) 2009-present The Bitcoin Core developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
@@ -9,9 +9,8 @@
#include <script/script.h>
#include <script/sign.h>
#include <script/signingprovider.h>
#include <util/vector.h>
#include <assert.h>
#include <cassert>
#include <optional>
#include <string>
@@ -68,19 +67,6 @@ CTxDestination GetDestinationForKey(const CPubKey& key, OutputType type)
assert(false);
}
std::vector<CTxDestination> GetAllDestinationsForKey(const CPubKey& key)
{
PKHash keyid(key);
CTxDestination p2pkh{keyid};
if (key.IsCompressed()) {
CTxDestination segwit = WitnessV0KeyHash(keyid);
CTxDestination p2sh = ScriptHash(GetScriptForDestination(segwit));
return Vector(std::move(p2pkh), std::move(p2sh), std::move(segwit));
} else {
return Vector(std::move(p2pkh));
}
}
CTxDestination AddAndGetDestinationForScript(FlatSigningProvider& keystore, const CScript& script, OutputType type)
{
// Add script to keystore