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:
parent
c52dcaf17c
commit
6aa23a2389
1 changed files with 5 additions and 1 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue