more relaxed validation
This commit is contained in:
@@ -375,9 +375,10 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
if (CheckPricesOpret(vintx, vintxOpret) == 0)
|
if (CheckPricesOpret(vintx, vintxOpret) == 0)
|
||||||
return eval->Invalid("cannot find prices opret in vintx");
|
return eval->Invalid("cannot find prices opret in vintx");
|
||||||
|
|
||||||
//if (vintxOpret.begin()[1] == 'B' && prevoutN == 3) {
|
if (funcId != 'F' && vintxOpret.begin()[1] == 'B' && prevoutN == 1) {
|
||||||
// return eval->Invalid("cannot spend bet marker");
|
//return eval->Invalid("cannot spend bet marker");
|
||||||
//}
|
std::cerr << "PricesValidate() " << " non-final tx cannot spend cc marker vout=" << prevoutN << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
if (!foundFirst) {
|
if (!foundFirst) {
|
||||||
prevoutN = vin.prevout.n;
|
prevoutN = vin.prevout.n;
|
||||||
@@ -412,7 +413,8 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (prevoutN != 0) { // check spending rules
|
if (prevoutN != 0) { // check spending rules
|
||||||
return eval->Invalid("incorrect vintx vout to spend");
|
// return eval->Invalid("incorrect vintx vout to spend");
|
||||||
|
std::cerr << "PricesValidate() " << "add fund tx incorrect vout to spend=" << prevoutN << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@@ -432,8 +434,9 @@ bool PricesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
return false;
|
return false;
|
||||||
if (!ValidateBetTx(cp, eval, firstVinTx))
|
if (!ValidateBetTx(cp, eval, firstVinTx))
|
||||||
return false;
|
return false;
|
||||||
if (prevoutN != 2) { // check spending rules
|
if (prevoutN != 1) { // check spending rules
|
||||||
return eval->Invalid("incorrect vout to spend");
|
// return eval->Invalid("incorrect vout to spend");
|
||||||
|
std::cerr << "PricesValidate() "<< "final tx incorrect vout to spend=" << prevoutN << std::endl;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user