Skip to content

Commit 8c70174

Browse files
committed
feat: add height diff in sync status
1 parent a58ab9f commit 8c70174

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmd/sync.go

+6
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ var storeStatusCmd = &cmds.Command{
8181
writer.Println("\tBase:", t.Base.Height(), t.Base.Key().String())
8282
writer.Println("\tTarget:", t.Head.Height(), t.Head.Key().String())
8383

84+
HeightDiff := t.Head.Height() - t.Base.Height()
85+
writer.Println("\tHeightDiff:", HeightDiff)
86+
8487
if t.Current != nil {
8588
writer.Println("\tCurrent:", t.Current.Height(), t.Current.Key().String())
8689
} else {
@@ -99,6 +102,9 @@ var storeStatusCmd = &cmds.Command{
99102
writer.Println("\tBase:", t.Base.Height(), t.Base.Key().String())
100103
writer.Println("\tTarget:", t.Head.Height(), t.Head.Key().String())
101104

105+
HeightDiff := t.Head.Height() - t.Base.Height()
106+
writer.Println("\tHeightDiff:", HeightDiff)
107+
102108
if t.Current != nil {
103109
writer.Println("\tCurrent:", t.Current.Height(), t.Current.Key().String())
104110
} else {

0 commit comments

Comments
 (0)