func ValidatePartialTree(leafIndices []uint64, leaves, proof [][]byte, expectedRoot []byte,
	hash HashFunc) (bool, error) {
	v, err := newValidator(leafIndices, leaves, proof, hash, false)
	if err != nil {
		return false, err
	}
	root, _, err := v.CalcRoot(MaxUint)
	return bytes.Equal(root, expectedRoot), err
}
ValidatePartialTree uses leafIndices, leaves and proof to calculate the merkle root of the tree and then compares it
to expectedRoot.
package merkle
import (
	"bytes"
	"errors"
	"fmt"
	"sort"
)
const MaxUint = ^uint(0)