mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-18 18:15:50 +00:00
Make some locks more granular:
- Overlay - Cluster - Validator List - Consensus The overlay also has its own lock and manages its own thread safety.
This commit is contained in:
@@ -36,7 +36,6 @@ namespace ripple {
|
||||
// XXX Might allow domain for manual connections.
|
||||
Json::Value doConnect (RPC::Context& context)
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
if (context.app.config().standalone())
|
||||
return "cannot connect in standalone mode";
|
||||
|
||||
|
||||
@@ -30,10 +30,7 @@ Json::Value doConsensusInfo (RPC::Context& context)
|
||||
{
|
||||
Json::Value ret (Json::objectValue);
|
||||
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
ret[jss::info] = context.netOps.getConsensusInfo ();
|
||||
}
|
||||
ret[jss::info] = context.netOps.getConsensusInfo ();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -33,8 +33,6 @@ Json::Value doPeers (RPC::Context& context)
|
||||
Json::Value jvResult (Json::objectValue);
|
||||
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
|
||||
jvResult[jss::peers] = context.app.overlay ().json ();
|
||||
|
||||
auto const now = context.app.timeKeeper().now();
|
||||
|
||||
@@ -27,7 +27,6 @@ namespace ripple {
|
||||
|
||||
Json::Value doUnlList (RPC::Context& context)
|
||||
{
|
||||
auto lock = make_lock(context.app.getMasterMutex());
|
||||
Json::Value obj (Json::objectValue);
|
||||
|
||||
context.app.validators().for_each_listed (
|
||||
@@ -41,7 +40,7 @@ Json::Value doUnlList (RPC::Context& context)
|
||||
TokenType::NodePublic, publicKey);
|
||||
node[jss::trusted] = trusted;
|
||||
|
||||
unl.append (node);
|
||||
unl.append (std::move (node));
|
||||
});
|
||||
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user