diff --git a/src/consensus/merkle.h b/src/consensus/merkle.h index ac622602e7a..c722cbe446f 100644 --- a/src/consensus/merkle.h +++ b/src/consensus/merkle.h @@ -28,10 +28,10 @@ uint256 BlockWitnessMerkleRoot(const CBlock& block, bool* mutated = nullptr); * Compute merkle path to the specified transaction * * @param[in] block the block - * @param[in] position transaction for which to calculate the merkle path, defaults to coinbase + * @param[in] position transaction for which to calculate the merkle path (0 is the coinbase) * * @return merkle path ordered from the deepest */ -std::vector TransactionMerklePath(const CBlock& block, uint32_t position = 0); +std::vector TransactionMerklePath(const CBlock& block, uint32_t position); #endif // BITCOIN_CONSENSUS_MERKLE_H diff --git a/src/node/interfaces.cpp b/src/node/interfaces.cpp index 6c06620ed24..f2518298c0e 100644 --- a/src/node/interfaces.cpp +++ b/src/node/interfaces.cpp @@ -913,7 +913,7 @@ public: std::vector getCoinbaseMerklePath() override { - return TransactionMerklePath(m_block_template->block); + return TransactionMerklePath(m_block_template->block, 0); } bool submitSolution(uint32_t version, uint32_t timestamp, uint32_t nonce, CMutableTransaction coinbase) override