42a6ab2d74267c1aa57c7d2d14bb9b85a6592966: kernel: Expose block header Merkle root
void btck_block_merkle_root_to_bytes(const btck_BlockMerkleRoot* merkle_root, unsigned char output[32])
{
std::memcpy(output, btck_BlockMerkleRoot::get(merkle_root).begin(), 32);
}
int btck_block_merkle_root_equals(const btck_BlockMerkleRoot* merkle_root1, const btck_BlockMerkleRoot* merkle_root2)
{
return btck_BlockMerkleRoot::get(merkle_root1) == btck_BlockMerkleRoot::get(merkle_root2);
}
nit: Consider mirroring the order of the above btck_block_hash_ which flips these and instead reads _copy, _to_bytes, _equals, _destroy. The same in bitcoinkernel.h