@@ -249,8 +249,8 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
}
|
}
|
||||||
fprintf(stderr,"fillbuy validated\n");
|
fprintf(stderr,"fillbuy validated\n");
|
||||||
break;
|
break;
|
||||||
case 'e': // selloffer
|
//case 'e': // selloffer
|
||||||
break; // disable swaps
|
// break; // disable swaps
|
||||||
case 's': // selloffer
|
case 's': // selloffer
|
||||||
//vin.0: normal input
|
//vin.0: normal input
|
||||||
//vin.1+: valid CC output for sale
|
//vin.1+: valid CC output for sale
|
||||||
@@ -322,6 +322,7 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
fprintf(stderr,"fill validated\n");
|
fprintf(stderr,"fill validated\n");
|
||||||
break;
|
break;
|
||||||
case 'E': // fillexchange
|
case 'E': // fillexchange
|
||||||
|
return eval->Invalid("unexpected assets funcid");
|
||||||
break; // disable asset swaps
|
break; // disable asset swaps
|
||||||
//vin.0: normal input
|
//vin.0: normal input
|
||||||
//vin.1: unspendable.(vout.0 assetoshis from selloffer) sellTx.vout[0]
|
//vin.1: unspendable.(vout.0 assetoshis from selloffer) sellTx.vout[0]
|
||||||
@@ -371,7 +372,11 @@ bool AssetsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx
|
|||||||
}
|
}
|
||||||
fprintf(stderr,"fill validated\n");
|
fprintf(stderr,"fill validated\n");
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
|
fprintf(stderr,"illegal assets funcid.(%c)\n",funcid);
|
||||||
|
return eval->Invalid("unexpected assets funcid");
|
||||||
|
break;
|
||||||
|
}
|
||||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -605,6 +605,10 @@ bool DiceValidate(struct CCcontract_info *cp,Eval *eval,const CTransaction &tx)
|
|||||||
else if ( DiceVerifyTimeout(vinTx,timeoutblocks) == 0 )
|
else if ( DiceVerifyTimeout(vinTx,timeoutblocks) == 0 )
|
||||||
return eval->Invalid("invalid timeout claim for timeout");
|
return eval->Invalid("invalid timeout claim for timeout");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr,"illegal dice funcid.(%c)\n",funcid);
|
||||||
|
return eval->Invalid("unexpected dice funcid");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||||
|
|||||||
@@ -649,6 +649,10 @@ 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:
|
||||||
|
fprintf(stderr,"illegal oracles funcid.(%c)\n",script[1]);
|
||||||
|
return eval->Invalid("unexpected OraclesValidate funcid");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||||
|
|||||||
@@ -287,6 +287,10 @@ bool RewardsValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &t
|
|||||||
return eval->Invalid("unlock tx vout.2 isnt 0");
|
return eval->Invalid("unlock tx vout.2 isnt 0");
|
||||||
preventCCvouts = 1;
|
preventCCvouts = 1;
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
fprintf(stderr,"illegal rewards funcid.(%c)\n",funcid);
|
||||||
|
return eval->Invalid("unexpected rewards funcid");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
return(PreventCC(eval,tx,preventCCvins,numvins,preventCCvouts,numvouts));
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ extern UniValue TxJoinSplitToJSON(const CTransaction& tx);
|
|||||||
extern uint8_t ASSETCHAINS_PRIVATE;
|
extern uint8_t ASSETCHAINS_PRIVATE;
|
||||||
uint32_t komodo_segid32(char *coinaddr);
|
uint32_t komodo_segid32(char *coinaddr);
|
||||||
int32_t komodo_dpowconfs(int32_t txheight,int32_t numconfs);
|
int32_t komodo_dpowconfs(int32_t txheight,int32_t numconfs);
|
||||||
|
int32_t komodo_isnotaryvout(char *coinaddr); // from ac_private chains only
|
||||||
|
|
||||||
int64_t nWalletUnlockTime;
|
int64_t nWalletUnlockTime;
|
||||||
static CCriticalSection cs_nWalletUnlockTime;
|
static CCriticalSection cs_nWalletUnlockTime;
|
||||||
@@ -3789,7 +3790,7 @@ UniValue z_sendmany(const UniValue& params, bool fHelp)
|
|||||||
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, unknown address format: ")+address );
|
throw JSONRPCError(RPC_INVALID_PARAMETER, string("Invalid parameter, unknown address format: ")+address );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( ASSETCHAINS_PRIVATE != 0 )
|
else if ( ASSETCHAINS_PRIVATE != 0 && komodo_isnotaryvout((char *)address.c_str()) == 0 )
|
||||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "cant use transparent addresses in private chain");
|
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "cant use transparent addresses in private chain");
|
||||||
|
|
||||||
if (setAddress.count(address))
|
if (setAddress.count(address))
|
||||||
|
|||||||
Reference in New Issue
Block a user