[#CalculateLockPointsAtTip]
= CalculateLockPointsAtTip
:mrdocs:

Calculate LockPoints required to check if transaction will be BIP68 final in the next block to be created on top of tip&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
std::optional&lt;LockPoints&gt;
CalculateLockPointsAtTip(
    xref:CBlockIndex.adoc[CBlockIndex]* tip,
    xref:CCoinsView.adoc[CCoinsView] const& coins&lowbar;view,
    xref:CTransaction.adoc[CTransaction] const& tx);
----

== Return Value

The resulting height and time calculated and the hash of the block needed for calculation, or std&colon;&colon;nullopt if there is an error&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tip* [in]
| Chain tip for which tx sequence locks are calculated&period; For example, the tip of the current active chain&period;
| *coins&lowbar;view* [in]
| Any CCoinsView that provides access to the relevant coins for checking sequence locks&period; For example, it can be a CCoinsViewCache that isn&apos;t connected to anything but contains all the relevant coins, or a CCoinsViewMemPool that is connected to the mempool and chainstate UTXO set&period; In the latter case, the caller is responsible for holding the appropriate locks to ensure that calls to GetCoin() return correct coins&period;
| *tx* [in]
| The transaction being evaluated&period;
|===


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