In src/rpc/blockchain.cpp:
"]\n"
);
CoinsViewScanReserver reserver;
if (reserver.reserve()) {
throw JSONRPCError(RPC_INVALID_PARAMETER, "No scan in progress");
}
result.pushKV("progress", g_scan_progress);
CoinsViewScanReserver reserver;
if (reserver.reserve()) {
return false;
Since this return value is subject to several races [1], I believe you could just return NullUniValue;
[1]:
e.g. the scan finishes between the last call and this one
e.g. this call returns true, but the last start call was not (yet) actually aborted