Merge a95a8ba3a3 into merged_master (Bitcoin PR bitcoin/bitcoin#31197)

This commit is contained in:
ivanlele 2026-04-09 09:24:18 +00:00
commit c0c0ed50b1
No known key found for this signature in database
5 changed files with 25 additions and 24 deletions

View file

@ -931,19 +931,17 @@ public:
std::vector<uint256> getCoinbaseMerklePath() override
{
return BlockMerkleBranch(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
bool submitSolution(uint32_t version, uint32_t timestamp, uint32_t nonce, CTransactionRef coinbase) override
{
CBlock block{m_block_template->block};
auto cb = MakeTransactionRef(std::move(coinbase));
if (block.vtx.size() == 0) {
block.vtx.push_back(cb);
block.vtx.push_back(coinbase);
} else {
block.vtx[0] = cb;
block.vtx[0] = coinbase;
}
block.nVersion = version;