getinfo rpc needs a cs_wallet lock
Without it we get an AssertLockHeld when calling GetKeyPoolSize . We could probably make this lock apply to less code, possibly only the single line that calls GetKeyPoolSize() needs it.
This commit is contained in:
@@ -231,11 +231,12 @@ UniValue getinfo(const UniValue& params, bool fHelp, const CPubKey& mypk)
|
|||||||
+ HelpExampleCli("getinfo", "")
|
+ HelpExampleCli("getinfo", "")
|
||||||
+ HelpExampleRpc("getinfo", "")
|
+ HelpExampleRpc("getinfo", "")
|
||||||
);
|
);
|
||||||
//#ifdef ENABLE_WALLET
|
|
||||||
// LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL);
|
#ifdef ENABLE_WALLET
|
||||||
//#else
|
LOCK2(cs_main, pwalletMain ? &pwalletMain->cs_wallet : NULL);
|
||||||
|
#else
|
||||||
LOCK(cs_main);
|
LOCK(cs_main);
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
proxyType proxy;
|
proxyType proxy;
|
||||||
GetProxy(NET_IPV4, proxy);
|
GetProxy(NET_IPV4, proxy);
|
||||||
|
|||||||
Reference in New Issue
Block a user