I needed to set fReqWallet to false so the wallet mutex is not acquired, avoiding deadlock with the mining thread.