waddrmgr: set timestamp for genesis block sync info

Not setting this would result in a non-sensible unix timestamp
(2288912640) being exposed when the wallet hasn't synced any blocks,
like in the case when it's waiting for the backend to sync.
This commit is contained in:
Wilmer Paulino 2020-06-01 12:51:58 -07:00
parent c52dcaf17c
commit 6aa23a2389
No known key found for this signature in database
GPG key ID: 6DF57B9F9514972F

View file

@ -1772,7 +1772,11 @@ func Create(ns walletdb.ReadWriteBucket,
// Use the genesis block for the passed chain as the created at block // Use the genesis block for the passed chain as the created at block
// for the default. // for the default.
createdAt := &BlockStamp{Hash: *chainParams.GenesisHash, Height: 0} createdAt := &BlockStamp{
Hash: *chainParams.GenesisHash,
Height: 0,
Timestamp: chainParams.GenesisBlock.Header.Timestamp,
}
// Create the initial sync state. // Create the initial sync state.
syncInfo := newSyncState(createdAt, createdAt) syncInfo := newSyncState(createdAt, createdAt)