refactor(proof): remove unused tx leaf helper

This commit is contained in:
Nicholas Dudfield
2026-06-26 19:57:44 +07:00
parent 45a69538cb
commit 7dddc8256a

View File

@@ -92,35 +92,6 @@ MerkleProof::toJsonV1() const
namespace {
/// Hash a transaction blob: SHA512Half(TXN prefix + blob)
uint256
hashTxBlob(Slice const& txBlob)
{
return sha512Half(HashPrefix::transactionID, txBlob);
}
/// Hash a tx+meta pair: SHA512Half(SND prefix + vl(tx) + tx + vl(meta) + meta +
/// hashTxBlob(tx)) This matches SHAMapInnerNode's leaf hash computation.
uint256
hashTxAndMeta(Slice const& txBlob, Slice const& metaBlob)
{
Serializer s(txBlob.size() + metaBlob.size() + 256);
// The SHAMap stores tx leaves as:
// HashPrefix::txNode + vl(tx) + vl(meta) + txHash
// where vl() is the variable-length encoding.
s.addRaw(txBlob);
Serializer metaSer;
metaSer.addRaw(metaBlob);
return sha512Half(
HashPrefix::txNode,
makeSlice(s.peekData()),
makeSlice(metaSer.peekData()),
hashTxBlob(txBlob));
}
/// Simple in-memory radix trie node for proof construction.
struct TrieNode
{