@@ -581,12 +581,12 @@ var ChainListCmd = &cli.Command{
581
581
Aliases : []string {"love" },
582
582
Usage : "View a segment of the chain" ,
583
583
Flags : []cli.Flag {
584
- & cli.Uint64Flag {Name : "height" , DefaultText : "current head" },
584
+ & cli.Uint64Flag {Name : "epoch" , Aliases : [] string { " height"} , DefaultText : "current head" },
585
585
& cli.IntFlag {Name : "count" , Value : 30 },
586
586
& cli.StringFlag {
587
- Name : "format" ,
588
- Usage : "specify the format to print out tipsets using placeholders like <height >, <time>, <blocks>, <tipset >, <weight >, <json_tipset>" ,
589
- Value : "<height >: (<time>) <blocks>" ,
587
+ Name : "format" ,
588
+ Usage : "specify the format to print out tipsets using placeholders: <epoch >, <time>, <blocks>, <weight >, <tipset >, <json_tipset>\n " ,
589
+ Value : "<epoch >: (<time>) <blocks>" ,
590
590
},
591
591
& cli.BoolFlag {
592
592
Name : "gas-stats" ,
@@ -932,7 +932,9 @@ func handleHamtAddress(ctx context.Context, api v0api.FullNode, r cid.Cid) error
932
932
}
933
933
934
934
func printTipSet (format string , ts * types.TipSet , afmt * AppFmt ) {
935
- format = strings .ReplaceAll (format , "<height>" , fmt .Sprint (ts .Height ()))
935
+ format = strings .ReplaceAll (format , "<epoch>" , fmt .Sprint (ts .Height ()))
936
+ format = strings .ReplaceAll (format , "<height>" , fmt .Sprint (ts .Height ())) // backwards compatibility
937
+
936
938
format = strings .ReplaceAll (format , "<time>" , time .Unix (int64 (ts .MinTimestamp ()), 0 ).Format (time .Stamp ))
937
939
blks := "[ "
938
940
for _ , b := range ts .Blocks () {
0 commit comments