[#HeadersSyncState-ProcessNextHeaders] = xref:HeadersSyncState.adoc[HeadersSyncState]::ProcessNextHeaders :relfileprefix: ../ :mrdocs: Process a batch of headers, once a sync via this mechanism has started == Synopsis Declared in `<headerssync.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:HeadersSyncState/ProcessingResult.adoc[ProcessingResult] ProcessNextHeaders( std::span<CBlockHeader const> received_headers, bool full_headers_message); ---- == Description received_headers: headers that were received over the network for processing. Assumes the caller has already verified the headers are continuous, and has checked that each header satisfies the proof‐of‐work target included in the header (but not necessarily verified that the proof‐of‐work target is correct and passes consensus rules). full_headers_message: true if the message was at max capacity, indicating more headers may be available ProcessingResult.pow_validated_headers: will be filled in with any headers that the caller can fully process and validate now (because these returned headers are on a chain with sufficient work) ProcessingResult.success: set to false if an error is detected and the sync is aborted; true otherwise. ProcessingResult.request_more: if true, the caller is suggested to call NextHeadersRequestLocator and send a getheaders message using it. == Return Value The processing result, including any headers ready for validation. == Parameters [cols="1,4"] |=== | Name| Description | *received_headers* | Continuous headers received from the peer to process. | *full_headers_message* | True if the message was at max capacity (more may follow). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#