From bbf9b82f6217380d0630547542d699c5b72d3b86 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 27 Jul 2018 02:29:21 -1100 Subject: [PATCH] Fix false positive error --- src/cc/rewards.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index 375a697cd..9b8ecbb1a 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -250,14 +250,15 @@ UniValue RewardsInfo(uint256 rewardsid) UniValue result(UniValue::VOBJ); uint256 hashBlock; CTransaction vintx; uint64_t APR,minseconds,maxseconds,mindeposit,sbits; char str[67],numstr[65]; if ( GetTransaction(rewardsid,vintx,hashBlock,false) == 0 ) { - fprintf(stderr,"cant find assetid\n"); - result.push_back(Pair("error","cant find assetid")); - return(0); + fprintf(stderr,"cant find fundingtxid\n"); + result.push_back(Pair("error","cant find fundingtxid")); + return(result); } - if ( vintx.vout.size() > 0 && DecodeRewardsFundingOpRet(vintx.vout[vintx.vout.size()-1].scriptPubKey,sbits,APR,minseconds,maxseconds,mindeposit) != 0 ) + if ( vintx.vout.size() > 0 && DecodeRewardsFundingOpRet(vintx.vout[vintx.vout.size()-1].scriptPubKey,sbits,APR,minseconds,maxseconds,mindeposit) == 0 ) { - fprintf(stderr,"assetid isnt assetcreation txid\n"); - result.push_back(Pair("error","assetid isnt assetcreation txid")); + fprintf(stderr,"fundingtxid isnt rewards creation txid\n"); + result.push_back(Pair("error","fundingtxid isnt rewards creation txid")); + return(result); } result.push_back(Pair("result","success")); result.push_back(Pair("fundingtxid",uint256_str(str,rewardsid)));