[#node-WaitTipChanged] = xref:node.adoc[node]::WaitTipChanged :relfileprefix: ../ :mrdocs: Waits for the connected tip to change until timeout has elapsed. During node initialization, this will wait until the tip is connected (regardless of `timeout`). Returns the current tip, or nullopt if the node is shutting down or interrupt() is called. == Synopsis Declared in `<node/miner.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- std::optional<interfaces::BlockRef> WaitTipChanged( xref:ChainstateManager.adoc[ChainstateManager]& chainman, xref:node/KernelNotifications.adoc[KernelNotifications]& kernel_notifications, xref:uint256.adoc[uint256] const& current_tip, xref:MillisecondsDouble.adoc[MillisecondsDouble]& timeout, bool& interrupt); ---- == Return Value The new tip reference, or std::nullopt if shutting down or interrupted. == Parameters [cols="1,4"] |=== | Name| Description | *chainman* | The chainstate manager to query. | *kernel_notifications* | The notifications object used to wait for tip changes. | *current_tip* | The tip hash to wait for a change from. | *timeout* | Maximum time to wait; updated with the remaining time. | *interrupt* | Flag that, when set, ends the wait early. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#