Better error checking
This commit is contained in:
@@ -353,7 +353,7 @@ bool ChannelsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &
|
||||
return eval->Invalid("unexpected channels funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else return eval->Invalid("unexpected channels missing funcid");
|
||||
retval = PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts);
|
||||
if ( retval != 0 )
|
||||
fprintf(stderr,"Channel tx validated\n");
|
||||
|
||||
@@ -704,7 +704,7 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
|
||||
return eval->Invalid("unexpected dice funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else return eval->Invalid("unexpected dice missing funcid");
|
||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||
}
|
||||
return(true);
|
||||
|
||||
@@ -651,12 +651,12 @@ bool OraclesValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
||||
}
|
||||
return eval->Invalid("unexpected OraclesValidate 'D' tx invalid");
|
||||
break;
|
||||
//default:
|
||||
// fprintf(stderr,"illegal oracles funcid.(%c)\n",script[1]);
|
||||
// return eval->Invalid("unexpected OraclesValidate funcid");
|
||||
// break;
|
||||
default:
|
||||
fprintf(stderr,"illegal oracles funcid.(%c)\n",script[1]);
|
||||
return eval->Invalid("unexpected OraclesValidate funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else return eval->Invalid("unexpected oracles missing funcid");
|
||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||
}
|
||||
return(true);
|
||||
|
||||
@@ -292,7 +292,7 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
||||
return eval->Invalid("unexpected rewards funcid");
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else return eval->Invalid("unexpected rewards missing funcid");
|
||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||
}
|
||||
return(true);
|
||||
|
||||
Reference in New Issue
Block a user