TMHASH is 32 bytes. Closes #1990 (#2732)

* tmhash is fully 32 bytes. closes #1990

* AddressSize

* fix tests

* fix max sizes
This commit is contained in:
Ethan Buchman
2018-10-31 12:42:05 -04:00
committed by GitHub
parent 1660e30ffe
commit a22c962e28
16 changed files with 96 additions and 51 deletions

View File

@@ -176,13 +176,12 @@ greater, for example:
h0 h1 h3 h4 h0 h1 h2 h3 h4 h5
```
Tendermint always uses the `TMHASH` hash function, which is the first 20-bytes
of the SHA256:
Tendermint always uses the `TMHASH` hash function, which is equivalent to
SHA256:
```
func TMHASH(bz []byte) []byte {
shasum := SHA256(bz)
return shasum[:20]
return SHA256(bz)
}
```