Return eval->error
This commit is contained in:
@@ -322,7 +322,7 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
||||
fprintf(stderr,"fill validated\n");
|
||||
break;
|
||||
case 'E': // fillexchange
|
||||
return(false);
|
||||
return eval->Invalid("unexpected assets fillexchange funcid");
|
||||
break; // disable asset swaps
|
||||
//vin.0: normal input
|
||||
//vin.1: unspendable.(vout.0 assetoshis from selloffer) sellTx.vout[0]
|
||||
@@ -374,7 +374,7 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"illegal assets funcid.(%c)\n",funcid);
|
||||
return(false);
|
||||
return eval->Invalid("unexpected assets funcid");
|
||||
break;
|
||||
}
|
||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||
|
||||
@@ -350,7 +350,7 @@ bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"illegal channels funcid.(%c)\n",funcid);
|
||||
return(false);
|
||||
return eval->Invalid("unexpected channels funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -597,11 +597,11 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
|
||||
return eval->Invalid("always should find vinofvin.0, but didnt for bet");
|
||||
else if ( vinTx.vin[0].prevout.hash != fundingtxid )
|
||||
{
|
||||
if ( vinofvinTx.vout[1].scriptPubKey != fundingPubKey )
|
||||
//if ( vinofvinTx.vout[vinTx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
||||
//if ( vinofvinTx.vout[1].scriptPubKey != fundingPubKey )
|
||||
if ( vinofvinTx.vout[vinTx.vin[0].prevout.n].scriptPubKey != fundingPubKey )
|
||||
{
|
||||
uint8_t *ptr0,*ptr1; int32_t i; char str[65];
|
||||
fprintf(stderr,"bidTx.%s\n",uint256_str(str,txid));
|
||||
fprintf(stderr,"betTx.%s\n",uint256_str(str,txid));
|
||||
fprintf(stderr,"entropyTx.%s v%d\n",uint256_str(str,tx.vin[0].prevout.hash),(int32_t)tx.vin[0].prevout.n);
|
||||
fprintf(stderr,"entropyTx vin0 %s v%d\n",uint256_str(str,vinTx.vin[0].prevout.hash),(int32_t)vinTx.vin[0].prevout.n);
|
||||
ptr0 = (uint8_t *)vinofvinTx.vout[vinTx.vin[0].prevout.n].scriptPubKey.data();
|
||||
@@ -701,7 +701,7 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"illegal dice funcid.(%c)\n",funcid);
|
||||
return(false);
|
||||
return eval->Invalid("unexpected dice funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -653,7 +653,7 @@ bool OraclesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"illegal oracles funcid.(%c)\n",script[1]);
|
||||
return(false);
|
||||
return eval->Invalid("unexpected OraclesValidate funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,7 +289,7 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr,"illegal rewards funcid.(%c)\n",funcid);
|
||||
return(false);
|
||||
return eval->Invalid("unexpected rewards funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user