From 6aa23a23896a09d92818133267c7d46e2d761473 Mon Sep 17 00:00:00 2001 From: Wilmer Paulino Date: Mon, 1 Jun 2020 12:51:58 -0700 Subject: [PATCH] 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. --- waddrmgr/manager.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/waddrmgr/manager.go b/waddrmgr/manager.go index b0f3bee..4dd4cae 100644 --- a/waddrmgr/manager.go +++ b/waddrmgr/manager.go @@ -1772,7 +1772,11 @@ func Create(ns walletdb.ReadWriteBucket, // Use the genesis block for the passed chain as the created at block // 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. syncInfo := newSyncState(createdAt, createdAt)