mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 23:29:12 +01:00
remove unused AddrToPubKey
This commit is contained in:
@@ -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
|
||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
|
||||
@@ -234,27 +234,6 @@ CPubKey HexToPubKey(const std::string& hex_in)
|
||||
return vchPubKey;
|
||||
}
|
||||
|
||||
// Retrieves a public key for an address from the given FillableSigningProvider
|
||||
CPubKey AddrToPubKey(const FillableSigningProvider& keystore, const std::string& addr_in)
|
||||
{
|
||||
CTxDestination dest = DecodeDestination(addr_in);
|
||||
if (!IsValidDestination(dest)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address: " + addr_in);
|
||||
}
|
||||
CKeyID key = GetKeyForDestination(keystore, dest);
|
||||
if (key.IsNull()) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("'%s' does not refer to a key", addr_in));
|
||||
}
|
||||
CPubKey vchPubKey;
|
||||
if (!keystore.GetPubKey(key, vchPubKey)) {
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("no full public key for address %s", addr_in));
|
||||
}
|
||||
if (!vchPubKey.IsFullyValid()) {
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet contains an invalid public key");
|
||||
}
|
||||
return vchPubKey;
|
||||
}
|
||||
|
||||
// Creates a multisig address from a given list of public keys, number of signatures required, and the address type
|
||||
CTxDestination AddAndGetMultisigDestination(const int required, const std::vector<CPubKey>& pubkeys, OutputType type, FlatSigningProvider& keystore, CScript& script_out)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user