From d9a1ff169556c7c8b8f12d391eeef75a3cc8e251 Mon Sep 17 00:00:00 2001 From: dimxy Date: Fri, 26 Apr 2019 00:48:35 +0500 Subject: [PATCH] added check vout==index --- src/cc/prices.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 9dd9091e9..0e4280563 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -1348,7 +1348,8 @@ UniValue PricesList(uint32_t filter, CPubKey mypk) cp = CCinit(&C, EVAL_PRICES); //pricespk = GetUnspendable(cp, 0); - auto priceslist = [&](std::vector >::const_iterator it, int32_t vini) + // filters and outputs prices bet txid + auto priceslist = [&](std::vector >::const_iterator it, int32_t nvout) { int64_t amount, firstprice; int32_t height; @@ -1359,6 +1360,8 @@ UniValue PricesList(uint32_t filter, CPubKey mypk) CTransaction vintx; txid = it->first.txhash; + if (nvout != it->first.index) // our marker vout + return; if (GetTransaction(txid, vintx, hashBlock, false) != 0) { @@ -1392,11 +1395,12 @@ UniValue PricesList(uint32_t filter, CPubKey mypk) priceslist(it, 3); } + /* for future when switch to cc marker only SetCCtxids(addressIndexCC, cp->unspendableCCaddr, true); // cc marker for (std::vector >::const_iterator it = addressIndexCC.begin(); it != addressIndexCC.end(); it++) { priceslist(it, 1); } - + */ return(result); } \ No newline at end of file