// TODO: Compute hash with outer merkle root method. public byte[] GetUnitHash() { IEnumerable <byte[]> blockHashes = blockStorage.Select(block => block.Hash); byte[] unitHash = merkleRootComputer.GetMerkleRoot(blockHashes, digest); return(unitHash); }
public byte[] GetHashForTransactions(IEnumerable <Transaction> transactions) { IEnumerable <byte[]> hashes = transactions.Select(transaction => transaction.Hash); return(merkleBuilder.GetMerkleRoot(hashes, digest)); }