Test
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
|
||||
#include "CCinclude.h"
|
||||
|
||||
#define EVAL_FAUCET 0xe4
|
||||
|
||||
extern const char *FaucetCCaddr;
|
||||
extern char FaucetCChexstr[67];
|
||||
|
||||
|
||||
@@ -4850,15 +4850,15 @@ UniValue faucetaddress(const UniValue& params, bool fHelp)
|
||||
if ( ensure_CCrequirements() < 0 )
|
||||
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||
result.push_back(Pair("result", "success"));
|
||||
if ( GetCCaddress(FAUCET_ASSETS,destaddr,pubkey2pk(pubkey)) != 0 )
|
||||
result.push_back(Pair("AssetsCCaddress",destaddr));
|
||||
if ( GetCCaddress(EVAL_FAUCET,destaddr,pubkey2pk(pubkey)) != 0 )
|
||||
result.push_back(Pair("FaucetCCaddress",destaddr));
|
||||
if ( params.size() == 1 )
|
||||
{
|
||||
pubkey = ParseHex(params[0].get_str().c_str());
|
||||
if ( GetCCaddress(FAUCET_ASSETS,destaddr,pubkey2pk(pubkey)) != 0 )
|
||||
if ( GetCCaddress(EVAL_FAUCET,destaddr,pubkey2pk(pubkey)) != 0 )
|
||||
result.push_back(Pair("CCaddress",destaddr));
|
||||
}
|
||||
if ( GetCCaddress(FAUCET_ASSETS,destaddr,pubkey2pk(Mypubkey())) != 0 )
|
||||
if ( GetCCaddress(EVAL_FAUCET,destaddr,pubkey2pk(Mypubkey())) != 0 )
|
||||
result.push_back(Pair("myCCaddress",destaddr));
|
||||
return(result);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user