예제 #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)
}
예제 #2
0
func (v *Validator) Hash() []byte {
	return binary.BinaryRipemd160(v)
}
예제 #3
0
// TODO: Or should this just be BinaryRipemd160(key)? (The difference is the TypeByte.)
func (pubKey PubKeyEd25519) Address() []byte { return binary.BinaryRipemd160(pubKey) }
예제 #4
0
파일: tx.go 프로젝트: readevalprint/eris-db
// 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)
}