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