[#node-AddMerkleRootAndCoinbase]
= xref:node.adoc[node]::AddMerkleRootAndCoinbase
:relfileprefix: ../
:mrdocs:

Insert the coinbase transaction and compute the merkle root of a block&period;

== Synopsis

Declared in `&lt;node&sol;miner&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
AddMerkleRootAndCoinbase(
    xref:CBlock.adoc[CBlock]& block,
    xref:CTransactionRef.adoc[CTransactionRef] coinbase,
    uint32&lowbar;t version,
    uint32&lowbar;t timestamp,
    uint32&lowbar;t nonce);
----

== Parameters

[cols="1,4"]
|===
| Name| Description
| *block*
| The block to finalize&period;
| *coinbase*
| The coinbase transaction to insert&period;
| *version*
| The block version to set&period;
| *timestamp*
| The block time to set&period;
| *nonce*
| The block nonce to set&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
