* Update wallet first key creation time. This should be called whenever keys * are added to the wallet, with the oldest key creation time. */
| 711 | * are added to the wallet, with the oldest key creation time. |
| 712 | */ |
| 713 | void 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 | |
| 725 | bool LegacyScriptPubKeyMan::LoadKey(const CKey& key, const CPubKey &pubkey) |
| 726 | { |