From 7a0727d5855f3e4f78725f2b5b8b440e3d2d6ffc Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 10 Aug 2018 10:37:00 -1100 Subject: [PATCH] Filter out CC utxo for normal add inputs --- src/cc/CCtx.cpp | 47 +++++++++++++++++++++++++---------------------- 1 file changed, 25 insertions(+), 22 deletions(-) diff --git a/src/cc/CCtx.cpp b/src/cc/CCtx.cpp index 65adc6655..7b42690ea 100644 --- a/src/cc/CCtx.cpp +++ b/src/cc/CCtx.cpp @@ -266,30 +266,33 @@ int64_t AddNormalinputs(CMutableTransaction &mtx,CPubKey mypk,int64_t total,int3 { txid = out.tx->GetHash(); vout = out.i; - if ( mtx.vin.size() > 0 ) + if ( GetTransaction(txid,tx,hashBlock,false) != 0 && tx.vout.size() > 0 && tx.vout[vout].scriptPubKey.IsPayToCryptoCondition() == 0 ) { - for (i=0; i 0 ) + { + for (i=0; i 0 ) + { + for (i=0; itxid = txid; + up->nValue = out.tx->vout[out.i].nValue; + up->vout = vout; + if ( n >= maxutxos ) break; - if ( i != mtx.vin.size() ) - continue; - } - if ( n > 0 ) - { - for (i=0; itxid = txid; - up->nValue = out.tx->vout[out.i].nValue; - up->vout = vout; - if ( n >= maxutxos ) - break; + } } } }