Esempio n. 1
0
// NOTE: hash is nil if required fields are missing.
func (h *Header) Hash() []byte {
	if len(h.StateHash) == 0 {
		return nil
	}

	return binary.BinaryRipemd160(h)
}
Esempio n. 2
0
func (v *Validator) Hash() []byte {
	return binary.BinaryRipemd160(v)
}
Esempio n. 3
0
// TODO: Or should this just be BinaryRipemd160(key)? (The difference is the TypeByte.)
func (pubKey PubKeyEd25519) Address() []byte { return binary.BinaryRipemd160(pubKey) }
Esempio n. 4
0
// This should match the leaf hashes of Block.Data.Hash()'s SimpleMerkleTree.
func TxID(chainID string, tx Tx) []byte {
	signBytes := account.SignBytes(chainID, tx)
	return binary.BinaryRipemd160(signBytes)
}