MCPcopy Create free account
hub / github.com/Jeiwan/blockchain_go / startNode

Method startNode

cli_startnode.go:8–18  ·  view source on GitHub ↗
(nodeID, minerAddress string)

Source from the content-addressed store, hash-verified

6)
7
8func (cli *CLI) startNode(nodeID, minerAddress string) {
9 fmt.Printf("Starting node %s\n", nodeID)
10 if len(minerAddress) > 0 {
11 if ValidateAddress(minerAddress) {
12 fmt.Println("Mining is on. Address to receive rewards: ", minerAddress)
13 } else {
14 log.Panic("Wrong miner address!")
15 }
16 }
17 StartServer(nodeID, minerAddress)
18}

Callers 1

RunMethod · 0.95

Calls 2

ValidateAddressFunction · 0.85
StartServerFunction · 0.85

Tested by

no test coverage detected