Skip to content

Commit

Permalink
add last block from database to recentBlock buffer on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
bitspill committed Oct 24, 2018
1 parent d650f50 commit b9f5882
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions sync/initialSync.go
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit b9f5882

Please sign in to comment.