Merge pull request #75 from blackjok3rtt/paymentsAD

Payments airdrop
This commit is contained in:
blackjok3rtt
2019-04-29 22:52:43 +08:00
committed by GitHub
13 changed files with 684 additions and 233 deletions

View File

@@ -5629,6 +5629,19 @@ UniValue payments_create(const UniValue& params, bool fHelp)
return(PaymentsCreate(cp,(char *)params[0].get_str().c_str()));
}
UniValue payments_airdrop(const UniValue& params, bool fHelp)
{
struct CCcontract_info *cp,C;
if ( fHelp || params.size() != 1 )
throw runtime_error("paymentsairdrop \"[lockedblocks,minamount,top,%22paytxid0%22,...,%22paytxidN%22]\"\n");
if ( ensure_CCrequirements(EVAL_PAYMENTS) < 0 )
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
const CKeyStore& keystore = *pwalletMain;
LOCK2(cs_main, pwalletMain->cs_wallet);
cp = CCinit(&C,EVAL_PAYMENTS);
return(PaymentsAirdrop(cp,(char *)params[0].get_str().c_str()));
}
UniValue payments_info(const UniValue& params, bool fHelp)
{
struct CCcontract_info *cp,C;