diff --git a/src/cc/CCutils.cpp b/src/cc/CCutils.cpp index f5576b239..033d18b6f 100644 --- a/src/cc/CCutils.cpp +++ b/src/cc/CCutils.cpp @@ -97,9 +97,15 @@ bool ConstrainVout(CTxOut vout,int32_t CCflag,char *cmpaddr,uint64_t nValue) return(false); } else if ( cmpaddr != 0 && (Getscriptaddress(destaddr,vout.scriptPubKey) == 0 || strcmp(destaddr,cmpaddr) != 0) ) + { + fprintf(stderr,"constrain vout error addr\n"); return(false); + } else if ( (nValue == 0 && vout.nValue < 10000) || nValue != vout.nValue ) + { + fprintf(stderr,"constrain vout error nValue %.8f vs %.8f\n",(double)nValue/COIN,(double)vout.nValue/COIN); return(false); + } else return(true); } diff --git a/src/wallet/rpcwallet.cpp b/src/wallet/rpcwallet.cpp index 7be4ff85d..e2bd693df 100644 --- a/src/wallet/rpcwallet.cpp +++ b/src/wallet/rpcwallet.cpp @@ -4837,7 +4837,7 @@ UniValue faucetfund(const UniValue& params, bool fHelp) UniValue result(UniValue::VOBJ); uint64_t funds; std::string hex; if ( fHelp || params.size() > 1 ) throw runtime_error("faucetfund amount\n"); - funds = atof(params[1].get_str().c_str()) * COIN; + funds = atof(params[0].get_str().c_str()) * COIN; hex = FaucetFund(0,funds); if ( hex.size() > 0 ) {