OSDN Git Service
(root)
/
bytom
/
bytom.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
edc577e3c9f6026791bfdc1b7715a75855aaaefe
[bytom/bytom.git]
/
cmd
/
bytomcli
/
commands
/
mining.go
1
package commands
2
3
import (
4
"os"
5
6
"github.com/spf13/cobra"
7
)
8
9
var isMiningCmd = &cobra.Command{
10
Use: "is-mining",
11
Short: "If client is actively mining new blocks",
12
Args: cobra.NoArgs,
13
Run: func(cmd *cobra.Command, args []string) {
14
data, exitCode := clientCall("/is-mining")
15
if exitCode != Success {
16
os.Exit(exitCode)
17
}
18
printJSON(data)
19
},
20
}