|
|
@ -16,6 +16,7 @@ |
|
|
|
#include "CCdice.h" |
|
|
|
|
|
|
|
extern std::string CCerror; |
|
|
|
#define ERR_RESULT(x) result.push_back(Pair("result", "error")) , result.push_back(Pair("error", x)); |
|
|
|
|
|
|
|
// timeout
|
|
|
|
|
|
|
@ -817,13 +818,13 @@ UniValue DiceInfo(uint256 diceid) |
|
|
|
if ( GetTransaction(diceid,vintx,hashBlock,false) == 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"cant find fundingtxid\n"); |
|
|
|
result.push_back(Pair("error","cant find fundingtxid")); |
|
|
|
ERR_RESULT("error","cant find fundingtxid"); |
|
|
|
return(result); |
|
|
|
} |
|
|
|
if ( vintx.vout.size() > 0 && DecodeDiceFundingOpRet(vintx.vout[vintx.vout.size()-1].scriptPubKey,sbits,minbet,maxbet,maxodds,timeoutblocks) == 0 ) |
|
|
|
{ |
|
|
|
fprintf(stderr,"fundingtxid isnt dice creation txid\n"); |
|
|
|
result.push_back(Pair("error","fundingtxid isnt dice creation txid")); |
|
|
|
ERR_RESULT("fundingtxid isnt dice creation txid"); |
|
|
|
return(result); |
|
|
|
} |
|
|
|
result.push_back(Pair("result","success")); |
|
|
|