This commit is contained in:
dimxy
2019-04-09 21:00:48 +05:00
parent 0aa62612aa
commit a2ca1ba661
2 changed files with 3 additions and 2 deletions

View File

@@ -564,9 +564,10 @@ UniValue PricesBet(uint64_t txfee,int64_t amount,int16_t leverage,std::vector<st
result.push_back(Pair("error","invalid synthetic"));
return(result);
}
if ( AddNormalinputs(mtx,mypk,amount+4*txfee,64) >= amount+4*txfee )
if ( AddNormalinputs(mtx,mypk,amount+5*txfee,64) >= amount+5*txfee )
{
betamount = (amount * 199) / 200;
mtx.vout.push_back(CTxOut(txfee, CScript() << std::vector<uint8_t>(pricespk.begin(), pricespk.end()))); // marker
mtx.vout.push_back(MakeCC1vout(cp->evalcode,txfee,mypk)); // baton for total funding
mtx.vout.push_back(MakeCC1vout(cp->evalcode,(amount-betamount)+2*txfee,pricespk));
mtx.vout.push_back(MakeCC1of2vout(cp->evalcode,betamount,pricespk,mypk));

View File

@@ -6931,7 +6931,7 @@ UniValue priceslist(const UniValue& params, bool fHelp)
UniValue pricesinfo(const UniValue& params, bool fHelp)
{
uint256 bettxid; int32_t height;
if ( fHelp || params.size() != 2 )
if ( fHelp || params.size() != 1 )
throw runtime_error("pricesinfo fundingtxid\n");
if ( ensure_CCrequirements(EVAL_PRICES) < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");