From 38f6c6f0fd94ab467e1a9dde77af571877d05016 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Oct 2016 19:27:59 -0300 Subject: [PATCH] test --- src/rpcblockchain.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rpcblockchain.cpp b/src/rpcblockchain.cpp index 179091abb..7a9a0a051 100644 --- a/src/rpcblockchain.cpp +++ b/src/rpcblockchain.cpp @@ -463,9 +463,12 @@ Value gettxout(const Array& params, bool fHelp) char *komodo_getspendscript(uint256 hash,int32_t n) { CCoins coins; CBlockIndex *pindex; - if ( pcoinsTip->GetCoins(hash,coins) == 0 ) + LOCK(cs_main); + LOCK(mempool.cs); + CCoinsViewMemPool view(pcoinsTip, mempool); + if (!view.GetCoins(hash, coins)) { - printf("null pcoinsTip->GetCoins\n"); + printf("null view.GetCoins\n"); return(0); } if ( n < 0 || (unsigned int)n >= coins.vout.size() )