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

Method UpdateTimeFirstKey

src/wallet/scriptpubkeyman.cpp:713–723  ·  view source on GitHub ↗

* Update wallet first key creation time. This should be called whenever keys * are added to the wallet, with the oldest key creation time. */

Source from the content-addressed store, hash-verified

711 * are added to the wallet, with the oldest key creation time.
712 */
713void LegacyScriptPubKeyMan::UpdateTimeFirstKey(int64_t nCreateTime)
714{
715 AssertLockHeld(cs_KeyStore);
716 if (nCreateTime <= 1) {
717 // Cannot determine birthday information, so set the wallet birthday to
718 // the beginning of time.
719 nTimeFirstKey = 1;
720 } else if (!nTimeFirstKey || nCreateTime < nTimeFirstKey) {
721 nTimeFirstKey = nCreateTime;
722 }
723}
724
725bool LegacyScriptPubKeyMan::LoadKey(const CKey& key, const CPubKey &pubkey)
726{

Callers 1

LoadWalletMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected