mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 14:53:43 +01:00
remove unused GetAllDestinationsForKey
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user