From 0d84fb208ec4b3a0a35f09b43711b4d96f3ccf84 Mon Sep 17 00:00:00 2001 From: jl777 Date: Thu, 9 Aug 2018 19:38:55 -1100 Subject: [PATCH] Error check add inputs loop --- src/cc/CCtx.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 4bc081e15..a22b4fd7d 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -249,7 +249,6 @@ int32_t CC_vinselect(int32_t *aboveip,int64_t *abovep,int32_t *belowip,int64_t * else if ( abovei >= 0 ) return(abovei); else return(belowi); - //return(abovei >= 0 && above < (below>>1) ? abovei : belowi); } int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int32_t maxinputs) @@ -283,19 +282,13 @@ int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int3 up->txid = txid; up->nValue = out.tx->vout[out.i].nValue; up->vout = vout; - /*mtx.vin.push_back(CTxIn(txid,vout,CScript())); - nValue = out.tx->vout[out.i].nValue; - totalinputs += nValue; - n++; - if ( totalinputs >= total || n >= maxinputs ) - break;*/ if ( n >= maxutxos ) break; } } } remains = total; - for (i=0; i0; i++) { below = above = 0; abovei = belowi = -1;