Skip to content

Commit

Permalink
Merge pull request #3502 from filecoin-project/area/ux-3388-sync-wait…
Browse files Browse the repository at this point in the history
…-target-height

 Added target height to sync wait
  • Loading branch information
magik6k authored Sep 3, 2020
2 parents 10acc04 + 860a6a2 commit 9727365
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cli/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,11 +180,13 @@ func SyncWait(ctx context.Context, napi api.FullNode) error {
ss := state.ActiveSyncs[working]

var target []cid.Cid
var theight abi.ChainEpoch
if ss.Target != nil {
target = ss.Target.Cids()
theight = ss.Target.Height()
}

fmt.Printf("\r\x1b[2KWorker %d: Target: %s\tState: %s\tHeight: %d", working, target, chain.SyncStageString(ss.Stage), ss.Height)
fmt.Printf("\r\x1b[2KWorker %d: Target Height: %d\tTarget: %s\tState: %s\tHeight: %d", working, theight, target, chain.SyncStageString(ss.Stage), ss.Height)

if time.Now().Unix()-int64(head.MinTimestamp()) < int64(build.BlockDelaySecs) {
fmt.Println("\nDone!")
Expand Down

0 comments on commit 9727365

Please sign in to comment.