[#ChainstateManager-nBlockSequenceId]
= xref:ChainstateManager.adoc[ChainstateManager]::nBlockSequenceId
:relfileprefix: ../
:mrdocs:

Every received block is assigned a unique and increasing identifier, so we know which one to give priority in case of a fork&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
&lsqb;&lsqb;guarded&lowbar;by(0x7f2e1bc16b28), guarded&lowbar;by(0x7f2e146b4e78), guarded&lowbar;by(0x7f2e298fa248), guarded&lowbar;by(0x7f2e360b79a8)&rsqb;&rsqb;
int32&lowbar;t nBlockSequenceId = SEQ&lowbar;ID&lowbar;INIT&lowbar;FROM&lowbar;DISK &plus; 1;
----

== Description

Blocks loaded from disk are assigned id SEQ&lowbar;ID&lowbar;INIT&lowbar;FROM&lowbar;DISK&lcub;1&rcub; (SEQ&lowbar;ID&lowbar;BEST&lowbar;CHAIN&lowbar;FROM&lowbar;DISK&lcub;0&rcub; if they belong to the best chain loaded from disk), so start the counter after that&period; &ast;


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