The Mining interface waitTipChanged()
method now returns nullopt
if the node is shutting down.
Previously it would return the last known tip during shutdown, but this creates an ambiguous circumstance in the scenario where the node is started and quickly shutdown, before notifications().TipBlock()
is set.
This allows the proposed waitNext()
method in #31283 to safely assume TipBlock()
isn’t null
, not even during a scenario of early shutdown.
The getblocktemplate
, waitfornewblock
and waitforblockheight
RPC calls now explicitly handle the shutdown scenario.