From 1eb57a7d9791101cf584feca0faad741c38a9cbb Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 7 Nov 2018 00:33:16 -1100 Subject: [PATCH] Eval->error() --- src/cc/assets.cpp | 4 ++-- src/cc/dice.cpp | 2 +- src/cc/oracles.cpp | 2 +- src/cc/rewards.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cc/assets.cpp b/src/cc/assets.cpp index 331959a37..1892a383f 100644 --- a/src/cc/assets.cpp +++ b/src/cc/assets.cpp @@ -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 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)); diff --git a/src/cc/dice.cpp b/src/cc/dice.cpp index a86fbea0c..c83ecf17a 100644 --- a/src/cc/dice.cpp +++ b/src/cc/dice.cpp @@ -607,7 +607,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; } } diff --git a/src/cc/oracles.cpp b/src/cc/oracles.cpp index 5abeada8e..168f62313 100644 --- a/src/cc/oracles.cpp +++ b/src/cc/oracles.cpp @@ -651,7 +651,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; } } diff --git a/src/cc/rewards.cpp b/src/cc/rewards.cpp index dd637a342..dc4c3be96 100644 --- a/src/cc/rewards.cpp +++ b/src/cc/rewards.cpp @@ -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; } }