| 1368 | } |
| 1369 | |
| 1370 | void LegacyScriptPubKeyMan::ReturnDestination(int64_t nIndex, bool fInternal, const CTxDestination&) |
| 1371 | { |
| 1372 | // Return to key pool |
| 1373 | { |
| 1374 | LOCK(cs_KeyStore); |
| 1375 | if (fInternal) { |
| 1376 | setInternalKeyPool.insert(nIndex); |
| 1377 | } else if (!set_pre_split_keypool.empty()) { |
| 1378 | set_pre_split_keypool.insert(nIndex); |
| 1379 | } else { |
| 1380 | setExternalKeyPool.insert(nIndex); |
| 1381 | } |
| 1382 | CKeyID& pubkey_id = m_index_to_reserved_key.at(nIndex); |
| 1383 | m_pool_key_to_index[pubkey_id] = nIndex; |
| 1384 | m_index_to_reserved_key.erase(nIndex); |
| 1385 | NotifyCanGetAddressesChanged(); |
| 1386 | } |
| 1387 | WalletLogPrintf("keypool return %d\n", nIndex); |
| 1388 | } |
| 1389 | |
| 1390 | bool LegacyScriptPubKeyMan::GetKeyFromPool(CPubKey& result, const OutputType type, bool internal) |
| 1391 | { |
nothing calls this directly
no test coverage detected