Browse Source

Test

pull/4/head
jl777 6 years ago
parent
commit
37e67a2ad6
  1. 6
      src/cc/CCutils.cpp
  2. 2
      src/wallet/rpcwallet.cpp

6
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);
}

2
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 )
{

Loading…
Cancel
Save