File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import (
11
11
"fmt"
12
12
"strconv"
13
13
14
+ "github.com/golang/protobuf/ptypes"
14
15
"github.com/spf13/cobra"
15
16
"google.golang.org/grpc/status"
16
17
@@ -64,10 +65,14 @@ func getBlock(args []string) (string, error) {
64
65
if err != nil {
65
66
return "" , err
66
67
}
68
+ ts , err := ptypes .Timestamp (blockMeta .Timestamp )
69
+ if err != nil {
70
+ return "" , err
71
+ }
67
72
return fmt .Sprintf ("Transactions: %d\n " , blockMeta .NumActions ) +
68
73
fmt .Sprintf ("Height: %d\n " , blockMeta .Height ) +
69
74
fmt .Sprintf ("Total Amount: %s\n " , blockMeta .TransferAmount ) +
70
- fmt .Sprintf ("Timestamp: %d\n " , blockMeta . Timestamp ) +
75
+ fmt .Sprintf ("Timestamp: %d\n " , ts . Unix () ) +
71
76
fmt .Sprintf ("Producer Address: %s %s\n " , blockMeta .ProducerAddress ,
72
77
action .Match (blockMeta .ProducerAddress , "address" )) +
73
78
fmt .Sprintf ("Transactions Root: %s\n " , blockMeta .TxRoot ) +
You can’t perform that action at this time.
0 commit comments