From 53b58ced34c280c325cd8cfcd59e71c8351f5280 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 18 Oct 2016 19:19:24 -0300 Subject: [PATCH] test --- src/komodo.h | 6 +++--- src/rpcblockchain.cpp | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/komodo.h b/src/komodo.h index c564775bf..ef0438070 100644 --- a/src/komodo.h +++ b/src/komodo.h @@ -57,12 +57,12 @@ int32_t iguana_rwbignum(int32_t rwflag,uint8_t *serialized,int32_t len,uint8_t * if ( rwflag == 0 ) { for (i=0; iGetCoins(hash,coins) == 0 ) - return(0); - if ( n < 0 || (unsigned int)n >= coins.vout.size() || coins.vout[n].IsNull() ) + { + printf("null pcoinsTip->GetCoins\n"); return(0); + } + if ( n < 0 || (unsigned int)n >= coins.vout.size() ) + { + printf("komodo_getspendscript illegal n.%d size.%d\n",n,coins.vout.size()); + return(0); + } BlockMap::iterator it = mapBlockIndex.find(pcoinsTip->GetBestBlock()); pindex = it->second; return((char *)coins.vout[n].scriptPubKey.ToString().c_str());