mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
wallet: fix legacy spkm default birth time
To avoid scanning blocks, as assumed by a wallet with no generated keys or imported scripts, the default value for the birth time needs to be set to the maximum int64_t value. Once the first key is generated or the first script is imported, the legacy SPKM will update the birth time automatically.
This commit is contained in:
parent
75fbf444c1
commit
6f497377aa
2 changed files with 6 additions and 2 deletions
|
|
@ -709,7 +709,7 @@ void LegacyScriptPubKeyMan::UpdateTimeFirstKey(int64_t nCreateTime)
|
|||
// Cannot determine birthday information, so set the wallet birthday to
|
||||
// the beginning of time.
|
||||
nTimeFirstKey = 1;
|
||||
} else if (!nTimeFirstKey || nCreateTime < nTimeFirstKey) {
|
||||
} else if (nTimeFirstKey == UNKNOWN_TIME || nCreateTime < nTimeFirstKey) {
|
||||
nTimeFirstKey = nCreateTime;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue