[backport#16865] test: add some unit tests for merkle.cpp
Summary:
following situations are covered:
- empty block
- one Tx
- Merkle root of a block with odd Txs should not change with repeating
last one
- Merkle root is computed with combining Merkle root of left subtree and right subtree
Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
Backport of Core PR16865
Test Plan: ninja && ninja check
Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien, deadalnix
Differential Revision: https://reviews.bitcoinabc.org/D8017