diff --git a/src/rpc/abc.cpp b/src/rpc/abc.cpp --- a/src/rpc/abc.cpp +++ b/src/rpc/abc.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -69,8 +70,11 @@ } // Set the new max block size. - if (!config.SetMaxBlockSize(ebs)) { - throw JSONRPCError(RPC_INVALID_PARAMETER, "Unexpected error"); + { + LOCK(cs_main); + if (!config.SetMaxBlockSize(ebs)) { + throw JSONRPCError(RPC_INVALID_PARAMETER, "Unexpected error"); + } } // settingsToUserAgentString();