corr test scriptpubkey
This commit is contained in:
@@ -314,7 +314,8 @@ static bool ValidateAddFundingTx(struct CCcontract_info *cp, Eval *eval, const C
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// validate costbasis tx helper
|
// validate costbasis tx helper (deprecated)
|
||||||
|
/*
|
||||||
static bool ValidateCostbasisTx(struct CCcontract_info *cp, Eval *eval, const CTransaction & costbasistx, const CTransaction & bettx)
|
static bool ValidateCostbasisTx(struct CCcontract_info *cp, Eval *eval, const CTransaction & costbasistx, const CTransaction & bettx)
|
||||||
{
|
{
|
||||||
uint256 bettxid;
|
uint256 bettxid;
|
||||||
@@ -374,6 +375,7 @@ static bool ValidateCostbasisTx(struct CCcontract_info *cp, Eval *eval, const CT
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// validate final tx helper
|
// validate final tx helper
|
||||||
static bool ValidateFinalTx(struct CCcontract_info *cp, Eval *eval, const CTransaction & finaltx, const CTransaction & bettx)
|
static bool ValidateFinalTx(struct CCcontract_info *cp, Eval *eval, const CTransaction & finaltx, const CTransaction & bettx)
|
||||||
@@ -509,6 +511,7 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/* not used:
|
||||||
case 'C': // set costbasis
|
case 'C': // set costbasis
|
||||||
if (!ValidateCostbasisTx(cp, eval, tx, firstVinTx)) {
|
if (!ValidateCostbasisTx(cp, eval, tx, firstVinTx)) {
|
||||||
//return false;
|
//return false;
|
||||||
@@ -523,7 +526,7 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
std::cerr << "PricesValidate() " << "costbasis tx incorrect vout to spend=" << prevoutN << std::endl;
|
std::cerr << "PricesValidate() " << "costbasis tx incorrect vout to spend=" << prevoutN << std::endl;
|
||||||
}
|
}
|
||||||
//return eval->Invalid("test: costbasis is good");
|
//return eval->Invalid("test: costbasis is good");
|
||||||
break;
|
break; */
|
||||||
|
|
||||||
case 'F': // final tx
|
case 'F': // final tx
|
||||||
case 'R':
|
case 'R':
|
||||||
@@ -1461,7 +1464,7 @@ UniValue PricesBet(int64_t txfee, int64_t amount, int16_t leverage, std::vector<
|
|||||||
GetKomodoEarlytxidScriptPub();
|
GetKomodoEarlytxidScriptPub();
|
||||||
}
|
}
|
||||||
mtx.vout.push_back(CTxOut(amount-betamount, KOMODO_EARLYTXID_SCRIPTPUB)); */
|
mtx.vout.push_back(CTxOut(amount-betamount, KOMODO_EARLYTXID_SCRIPTPUB)); */
|
||||||
mtx.vout.push_back(CTxOut(amount - betamount, CScript() << ParseHex("76a91412046a2aaaa2d041740aa2b755757bed270541d888ac") << OP_CHECKSIG)); // test revshare fee
|
mtx.vout.push_back(CTxOut(amount - betamount, CScript(ParseHex("76a91412046a2aaaa2d041740aa2b755757bed270541d888ac")))); // vout4 test revshare fee
|
||||||
|
|
||||||
rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee, prices_betopret(mypk, nextheight - 1, amount, leverage, firstprice, vec, zeroid));
|
rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee, prices_betopret(mypk, nextheight - 1, amount, leverage, firstprice, vec, zeroid));
|
||||||
return(prices_rawtxresult(result, rawtx, 0));
|
return(prices_rawtxresult(result, rawtx, 0));
|
||||||
@@ -1518,7 +1521,7 @@ UniValue PricesAddFunding(int64_t txfee, uint256 bettxid, int64_t amount)
|
|||||||
mtx.vin.push_back(CTxIn(batontxid, 0, CScript()));
|
mtx.vin.push_back(CTxIn(batontxid, 0, CScript()));
|
||||||
mtx.vout.push_back(MakeCC1vout(cp->evalcode, txfee, mypk)); // vout0 baton for total funding
|
mtx.vout.push_back(MakeCC1vout(cp->evalcode, txfee, mypk)); // vout0 baton for total funding
|
||||||
mtx.vout.push_back(MakeCC1vout(cp->evalcode, betamount, pricespk)); // vout1 added amount
|
mtx.vout.push_back(MakeCC1vout(cp->evalcode, betamount, pricespk)); // vout1 added amount
|
||||||
mtx.vout.push_back(CTxOut(amount - betamount, CScript() << ParseHex("76a91412046a2aaaa2d041740aa2b755757bed270541d888ac") << OP_CHECKSIG)); //vout2 test revshare fee
|
mtx.vout.push_back(CTxOut(amount - betamount, CScript(ParseHex("76a91412046a2aaaa2d041740aa2b755757bed270541d888ac")))); //vout2 test revshare fee
|
||||||
|
|
||||||
rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee, prices_addopret(bettxid, mypk, amount));
|
rawtx = FinalizeCCTx(0, cp, mtx, mypk, txfee, prices_addopret(bettxid, mypk, amount));
|
||||||
return(prices_rawtxresult(result, rawtx, 0));
|
return(prices_rawtxresult(result, rawtx, 0));
|
||||||
|
|||||||
Reference in New Issue
Block a user