[#VersionBitsCache-ComputeBlockVersion]
= xref:VersionBitsCache.adoc[VersionBitsCache]::ComputeBlockVersion
:relfileprefix: ../
:mrdocs:

Determine what nVersion a new block should use

== Synopsis

Declared in `&lt;versionbits&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;requires&lowbar;capability(0x7f9500ef3678), requires&lowbar;capability(0x7f95120fd2e8), requires&lowbar;capability(0x7f951e75bc98), requires&lowbar;capability(0x7f94f8f84fc8), requires&lowbar;capability(0x7f9513e37b38), requires&lowbar;capability(0x7f94f32665b8), requires&lowbar;capability(0x7f9516a86e48)&rsqb;&rsqb;
int32&lowbar;t
ComputeBlockVersion(
    xref:CBlockIndex.adoc[CBlockIndex] const* pindexPrev,
    xref:Consensus/Params.adoc[Consensus::Params] const& params);
----

== Return Value

The version to use for the new block&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *pindexPrev*
| The parent block preceding the new block&period;
| *params*
| The consensus parameters holding the deployments&period;
|===


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