forked from TrueCloudLab/frostfs-node
[#833] cli/netmap: Beautify output of MillisecondsPerBlock parameter
Convert milliseconds to `time.Duration` value and use its stringer in `netinfo` command. Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
8f9b1fe090
commit
e5e5395830
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package cmd
|
|||
import (
|
||||
"context"
|
||||
"encoding/hex"
|
||||
"time"
|
||||
|
||||
"github.com/mr-tron/base58"
|
||||
"github.com/nspcc-dev/neo-go/pkg/config/netmode"
|
||||
|
@ -162,7 +163,7 @@ var netInfoCmd = &cobra.Command{
|
|||
magic := netInfo.MagicNumber()
|
||||
cmd.Printf("Network magic: [%s] %d\n", netmode.Magic(magic), magic)
|
||||
|
||||
cmd.Printf("MillisecondsPerBlock: %d\n", netInfo.MsPerBlock())
|
||||
cmd.Printf("Time per block: %s\n", time.Duration(netInfo.MsPerBlock())*time.Millisecond)
|
||||
|
||||
netCfg := netInfo.NetworkConfig()
|
||||
|
||||
|
|
Loading…
Reference in a new issue