verifyProof
Verifies a BitTorrent v2 hashes proof (BEP 52 / hash_request): given the file's known piecesRoot, a contiguous run of baseHashes starting at startIndex in the base layer, and the proofLayers uncle hashes, returns true iff they hash all the way up to piecesRoot.
This is the headline check the wire-protocol HashPicker uses to accept hashes received from a peer before inserting them into a MerkleTree. Mirrors the accept/reject decision of merkle_validate_and_insert_proofs (without the insertion side effect).
Parameters
the file's known apex root to validate against.
the run of received leaf/base hashes, in order (non-empty).
offset of the first base hash within the base layer.
the uncle hashes, bottom-up; empty when the base subtree spans the whole tree.
pad hash for the base layer (default the all-zero block pad).