Fix expired string_view in non-jsonrpc requests Non-JSONRPC HTTP requests do the body parsing (either binary or JSON) in the worker thread, but by then the string_view from uWebSockets is no longer valid. Fix it by making rpc_request able to hold an owned. std::string and use that for HTTP (non-JSONRPC) requests.
adds two new mining options, available via rpc: - slow_mining - this avoids the RandomJDX initialization. It is much slower, but for regtest with fixed difficulty of 1 that is perfectly fine. - 'num_blocks' - instruct the miner to mine for the given number of blocks, then stop. (This can overmine if mining with multiple threads at a low difficulty, but that's fine).