Skip to main content

What Happens If a Block Has an Odd Number of Transactions?

If a block has an odd number of transaction hashes (leaves), the last remaining hash is duplicated and then paired with itself for the next level of hashing. This ensures that all hashes are paired up to continue the process of reducing the tree until the single Merkle Root is achieved.

This duplication is a standard convention in Merkle Tree construction.

What Happens to the Block Discovery Time If the Network Hash Rate Suddenly Drops?
How Does Hashing Relate to the Concept of a Merkle Tree in a Blockchain?
Are There Any Remaining Forms of Counterparty Risk in Decentralized Derivatives Trading?
How Can Smart Contracts Use Hashing to Ensure Fair Derivative Settlement?