rpc: make gettxoutsettinfo run lock-free

For leveldb "An iterator operates on a snapshot of the database taken
when the iterator is created". This means that it is unnecessary to
lock out other threads while computing statistics, and neither to hold
cs_main for the whole time. Let the thread run free.
This commit is contained in:
Wladimir J. van der Laan
2014-10-22 09:25:08 +02:00
parent c1fb0e1075
commit 57092ed9e7
2 changed files with 4 additions and 3 deletions

View File

@@ -345,8 +345,6 @@ UniValue gettxoutsetinfo(const UniValue& params, bool fHelp)
+ HelpExampleRpc("gettxoutsetinfo", "")
);
LOCK(cs_main);
UniValue ret(UniValue::VOBJ);
CCoinsStats stats;