Enforce score == payout
This commit is contained in:
@@ -2930,10 +2930,12 @@ bool sudoku_validate(struct CCcontract_info *cp,int32_t height,Eval *eval,const
|
||||
case 'G':
|
||||
if ( sudoku_genopreturndecode(unsolved,scriptPubKey) == 'G' )
|
||||
{
|
||||
fprintf(stderr,"unsolved.(%s)\n",unsolved);
|
||||
//fprintf(stderr,"unsolved.(%s)\n",unsolved);
|
||||
if ( dupree_solver(0,&score,unsolved) != 1 || score*COIN != tx.vout[1].nValue )
|
||||
{
|
||||
fprintf(stderr,"ht.%d score.%d vs %.8f %s\n",height,score,(double)tx.vout[1].nValue/COIN,tx.GetHash().ToString().c_str());
|
||||
if ( ht > 2000 )
|
||||
return eval->Invalid("mismatched sudoku value vs score");
|
||||
}
|
||||
}
|
||||
return(true);
|
||||
|
||||
Reference in New Issue
Block a user