| 304 | } |
| 305 | |
| 306 | bool LegacyScriptPubKeyMan::GetReservedDestination(const OutputType type, bool internal, CTxDestination& address, int64_t& index, CKeyPool& keypool, bilingual_str& error) |
| 307 | { |
| 308 | if (LEGACY_OUTPUT_TYPES.count(type) == 0) { |
| 309 | error = _("Error: Legacy wallets only support the \"legacy\", \"p2sh-segwit\", and \"bech32\" address types"); |
| 310 | return false; |
| 311 | } |
| 312 | assert(type != OutputType::BECH32M); |
| 313 | |
| 314 | LOCK(cs_KeyStore); |
| 315 | if (!CanGetAddresses(internal)) { |
| 316 | error = _("Error: Keypool ran out, please call keypoolrefill first"); |
| 317 | return false; |
| 318 | } |
| 319 | |
| 320 | if (!ReserveKeyFromKeyPool(index, keypool, internal)) { |
| 321 | error = _("Error: Keypool ran out, please call keypoolrefill first"); |
| 322 | return false; |
| 323 | } |
| 324 | address = GetDestinationForKey(keypool.vchPubKey, type); |
| 325 | return true; |
| 326 | } |
| 327 | |
| 328 | bool LegacyScriptPubKeyMan::TopUpInactiveHDChain(const CKeyID seed_id, int64_t index, bool internal) |
| 329 | { |
nothing calls this directly
no test coverage detected