Show block height in 'printchain' command
This commit is contained in:
parent
2734285450
commit
0c59d8cd52
|
@ -15,6 +15,7 @@ func (cli *CLI) printChain(nodeID string) {
|
||||||
block := bci.Next()
|
block := bci.Next()
|
||||||
|
|
||||||
fmt.Printf("============ Block %x ============\n", block.Hash)
|
fmt.Printf("============ Block %x ============\n", block.Hash)
|
||||||
|
fmt.Printf("Height: %d\n", block.Height)
|
||||||
fmt.Printf("Prev. block: %x\n", block.PrevBlockHash)
|
fmt.Printf("Prev. block: %x\n", block.PrevBlockHash)
|
||||||
pow := NewProofOfWork(block)
|
pow := NewProofOfWork(block)
|
||||||
fmt.Printf("PoW: %s\n\n", strconv.FormatBool(pow.Validate()))
|
fmt.Printf("PoW: %s\n\n", strconv.FormatBool(pow.Validate()))
|
||||||
|
|
Loading…
Reference in New Issue