mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
Merge a95a8ba3a3 into merged_master (Bitcoin PR bitcoin/bitcoin#31197)
This commit is contained in:
commit
c0c0ed50b1
5 changed files with 25 additions and 24 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue