docs: fix some language issues and deprecated link (#3733)

This commit is contained in:
Hans Schoenburg
2019-06-19 20:35:53 +02:00
committed by Anton Kaliaev
parent ed18ffdca3
commit 60827f7562
6 changed files with 10 additions and 8 deletions

View File

@@ -218,7 +218,7 @@ func MerkleRoot(items [][]byte) []byte{
case 0:
return nil
case 1:
return leafHash(leafs[0])
return leafHash(items[0])
default:
k := getSplitPoint(len(items))
left := MerkleRoot(items[:k])

View File

@@ -59,7 +59,7 @@ type Validator struct {
When hashing the Validator struct, the address is not included,
because it is redundant with the pubkey.
The `state.Validators`, `state.LastValidators`, and `state.NextValidators`, must always by sorted by validator address,
The `state.Validators`, `state.LastValidators`, and `state.NextValidators`, must always be sorted by validator address,
so that there is a canonical order for computing the MerkleRoot.
We also define a `TotalVotingPower` function, to return the total voting power: