// According to the input, calculate the hash according to the proof, and return the result.
// If the proof is empty, the input is returned
According to the input, calculate the hash according to the proof, and return the result.
If the proof is empty, the input is returned
// According to the input calculate the hash according to the proof and return the result . // If the proof is empty the input is returned
func (p *MerkleProofs) Proof(toBeProof Hash) ([]byte, error) {
	h := toBeProof[:]
	if p != nil {
		for i := 0; i < len(p.Hashs); i++ {
			if p.Order(i) {
				h = HashPair(p.Hashs[i][:], h)
			} else {
				h = HashPair(h, p.Hashs[i][:])
			}
		}
	}
	return h, nil
}
func ( p * MerkleProofs ) Proof ( toBeProof Hash ) ( [ ] byte , error ) { h := toBeProof [ : ] if p != nil { for i := 0 ; i < len ( p . Hashs ) ; i ++ { if p . Order ( i ) { h = HashPair ( p . Hashs [ i ] [ : ] , h ) } else { h = HashPair ( h , p . Hashs [ i ] [ : ] ) } } } return h , nil }
According to the input, calculate the hash according to the proof, and return the result.
According to the input calculate the hash according to the proof and return the result .