diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2014-10-22 09:25:08 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-06-16 13:50:38 +0200 |
commit | 57092ed9e7edb3c60adc75823dd922ad67ddec62 (patch) | |
tree | 00762b0a09ef2761b8fa025e8227d0f9a971b038 /src/rpcblockchain.cpp | |
parent | c1fb0e1075f626ea23d832b07b2070e0638f4215 (diff) |
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.
Diffstat (limited to 'src/rpcblockchain.cpp')
-rw-r--r-- | src/rpcblockchain.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index e45368cb97..85229e9857 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -345,8 +345,6 @@ UniValue gettxoutsetinfo(const UniValue& params, bool fHelp) + HelpExampleRpc("gettxoutsetinfo", "") ); - LOCK(cs_main); - UniValue ret(UniValue::VOBJ); CCoinsStats stats; |