HomePhabricator

refactor: Replace RecursiveMutex with Mutex in rpc/server.cpp

Description

refactor: Replace RecursiveMutex with Mutex in rpc/server.cpp

Summary:
The functions that could lock this mutex, i.e., SetRPCWarmupStatus(), SetRPCWarmupFinished(), RPCIsInWarmup(), CRPCTable::execute(), do not call itself recursively, and do not call each other either directly or indirectly. Therefore, the g_rpc_warmup_mutex could be a non-recursive mutex.

This is a backport of core#19399

Test Plan: ninja all check-all

Reviewers: #bitcoin_abc, deadalnix

Reviewed By: #bitcoin_abc, deadalnix

Differential Revision: https://reviews.bitcoinabc.org/D9449

Details

Provenance
Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>Authored on Apr 27 2021, 17:24
PiRKCommitted on Apr 27 2021, 17:25
abc-botPushed on Apr 27 2021, 17:31
Reviewer
Restricted Project
Differential Revision
D9449: refactor: Replace RecursiveMutex with Mutex in rpc/server.cpp
Parents
rABCcbf849a1c177: refactor: Use Mutex type for g_cs_recent_confirmed_transactions
Branches
Unknown
Tags
Unknown