MCPcopy Create free account
hub / github.com/ElementsProject/elements / KeepDestination

Method KeepDestination

src/wallet/scriptpubkeyman.cpp:1356–1368  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1354}
1355
1356void LegacyScriptPubKeyMan::KeepDestination(int64_t nIndex, const OutputType& type)
1357{
1358 assert(type != OutputType::BECH32M);
1359 // Remove from key pool
1360 WalletBatch batch(m_storage.GetDatabase());
1361 batch.ErasePool(nIndex);
1362 CPubKey pubkey;
1363 bool have_pk = GetPubKey(m_index_to_reserved_key.at(nIndex), pubkey);
1364 assert(have_pk);
1365 LearnRelatedScripts(pubkey, type);
1366 m_index_to_reserved_key.erase(nIndex);
1367 WalletLogPrintf("keypool keep %d\n", nIndex);
1368}
1369
1370void LegacyScriptPubKeyMan::ReturnDestination(int64_t nIndex, bool fInternal, const CTxDestination&)
1371{

Callers

nothing calls this directly

Calls 3

GetPubKeyFunction · 0.85
ErasePoolMethod · 0.80
eraseMethod · 0.45

Tested by

no test coverage detected