From 74a3757792e92fd037f3cca8c269f5999fd867f9 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Oct 2016 19:30:22 -0300 Subject: [PATCH] test --- src/rpcblockchain.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 7a9a0a051..1c4f2bff0 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -464,12 +464,14 @@ char *komodo_getspendscript(uint256 hash,int32_t n) { CCoins coins; CBlockIndex *pindex; LOCK(cs_main); - LOCK(mempool.cs); - CCoinsViewMemPool view(pcoinsTip, mempool); - if (!view.GetCoins(hash, coins)) { - printf("null view.GetCoins\n"); - return(0); + LOCK(mempool.cs); + CCoinsViewMemPool view(pcoinsTip, mempool); + if (!view.GetCoins(hash, coins)) + { + printf("null view.GetCoins\n"); + return(0); + } } if ( n < 0 || (unsigned int)n >= coins.vout.size() ) {