[#PeerManager-FetchBlock]
= xref:PeerManager.adoc[PeerManager]::FetchBlock
:relfileprefix: ../
:mrdocs:

Attempt to manually fetch block from a given peer&period; We must already have the header&period;

== Synopsis

Declared in `&lt;net&lowbar;processing&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
xref:util/Expected-0b.adoc[util::Expected&lt;void, std::string&gt;]
FetchBlock(
    xref:NodeId-08.adoc[NodeId] peer&lowbar;id,
    xref:CBlockIndex.adoc[CBlockIndex] const& block&lowbar;index) = 0;
----

== Return Value

An empty result on success, or an error message describing why the fetch could not be started&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *peer&lowbar;id* [in]
| The peer id
| *block&lowbar;index* [in]
| The blockindex
|===


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