|
1 |
| -// Copyright (c) 2017-2022 The Bitcoin Core developers |
| 1 | +// Copyright (c) 2017-present The Bitcoin Core developers |
2 | 2 | // Distributed under the MIT software license, see the accompanying
|
3 | 3 | // file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
4 | 4 |
|
@@ -234,27 +234,6 @@ CPubKey HexToPubKey(const std::string& hex_in)
|
234 | 234 | return vchPubKey;
|
235 | 235 | }
|
236 | 236 |
|
237 |
| -// Retrieves a public key for an address from the given FillableSigningProvider |
238 |
| -CPubKey AddrToPubKey(const FillableSigningProvider& keystore, const std::string& addr_in) |
239 |
| -{ |
240 |
| - CTxDestination dest = DecodeDestination(addr_in); |
241 |
| - if (!IsValidDestination(dest)) { |
242 |
| - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Invalid address: " + addr_in); |
243 |
| - } |
244 |
| - CKeyID key = GetKeyForDestination(keystore, dest); |
245 |
| - if (key.IsNull()) { |
246 |
| - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("'%s' does not refer to a key", addr_in)); |
247 |
| - } |
248 |
| - CPubKey vchPubKey; |
249 |
| - if (!keystore.GetPubKey(key, vchPubKey)) { |
250 |
| - throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, strprintf("no full public key for address %s", addr_in)); |
251 |
| - } |
252 |
| - if (!vchPubKey.IsFullyValid()) { |
253 |
| - throw JSONRPCError(RPC_INTERNAL_ERROR, "Wallet contains an invalid public key"); |
254 |
| - } |
255 |
| - return vchPubKey; |
256 |
| -} |
257 |
| - |
258 | 237 | // Creates a multisig address from a given list of public keys, number of signatures required, and the address type
|
259 | 238 | CTxDestination AddAndGetMultisigDestination(const int required, const std::vector<CPubKey>& pubkeys, OutputType type, FlatSigningProvider& keystore, CScript& script_out)
|
260 | 239 | {
|
|
0 commit comments