This is for what I named malleable32 (since hashes are duplicated and each is 32 bytes). There is also a trivial method for malleable64 (since this applies to a block of all 64 byte txs).
bool block::is_malleable64(const transaction_cptrs& txs) NOEXCEPT
{
const auto two_leaves = [](const transaction::cptr& tx) NOEXCEPT
{
return tx->serialized_size(false) == two * hash_size;
};
return !txs.empty() && std::all_of(txs.begin(), txs.end(), two_leaves);
}