From b9f588251d6d361cc6c6415f1534526c08d73f3e Mon Sep 17 00:00:00 2001 From: Jeremiah Buddenhagen Date: Wed, 24 Oct 2018 12:17:22 -0700 Subject: [PATCH] add last block from database to recentBlock buffer on startup --- sync/initialSync.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sync/initialSync.go b/sync/initialSync.go index e6cf682..9ff4ff4 100644 --- a/sync/initialSync.go +++ b/sync/initialSync.go @@ -21,6 +21,8 @@ func InitialSync(ctx context.Context, count int64) (datastore.BlockData, error) return lb, err } + recentBlocks.Push(&lb) + if lb.Block != nil { lbh = lb.Block.Height