batonamount
This commit is contained in:
@@ -379,7 +379,7 @@ int32_t MarmaraGetCreditloops(int64_t &totalamount,std::vector<uint256> &issuanc
|
|||||||
UniValue MarmaraReceive(uint64_t txfee,CPubKey senderpk,int64_t amount,std::string currency,int32_t matures,uint256 batontxid)
|
UniValue MarmaraReceive(uint64_t txfee,CPubKey senderpk,int64_t amount,std::string currency,int32_t matures,uint256 batontxid)
|
||||||
{
|
{
|
||||||
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
|
CMutableTransaction mtx = CreateNewContextualCMutableTransaction(Params().GetConsensus(), komodo_nextheight());
|
||||||
UniValue result(UniValue::VOBJ); CPubKey mypk; struct CCcontract_info *cp,C; std::string rawtx; char *errorstr=0; uint256 createtxid; int64_t amount; int32_t needbaton = 0;
|
UniValue result(UniValue::VOBJ); CPubKey mypk; struct CCcontract_info *cp,C; std::string rawtx; char *errorstr=0; uint256 createtxid; int64_t batonamount; int32_t needbaton = 0;
|
||||||
cp = CCinit(&C,EVAL_MARMARA);
|
cp = CCinit(&C,EVAL_MARMARA);
|
||||||
if ( txfee == 0 )
|
if ( txfee == 0 )
|
||||||
txfee = 10000;
|
txfee = 10000;
|
||||||
@@ -397,9 +397,9 @@ UniValue MarmaraReceive(uint64_t txfee,CPubKey senderpk,int64_t amount,std::stri
|
|||||||
if ( errorstr == 0 )
|
if ( errorstr == 0 )
|
||||||
{
|
{
|
||||||
if ( batontxid != zeroid )
|
if ( batontxid != zeroid )
|
||||||
amount = txfee;
|
batonamount = txfee;
|
||||||
else amount = 2*txfee;
|
else batonamount = 2*txfee;
|
||||||
if ( AddNormalinputs(mtx,mypk,amount + txfee,1) > 0 )
|
if ( AddNormalinputs(mtx,mypk,batonamount + txfee,1) > 0 )
|
||||||
{
|
{
|
||||||
errorstr = (char *)"couldnt finalize CCtx";
|
errorstr = (char *)"couldnt finalize CCtx";
|
||||||
mtx.vout.push_back(MakeCC1vout(EVAL_MARMARA,amount,senderpk));
|
mtx.vout.push_back(MakeCC1vout(EVAL_MARMARA,amount,senderpk));
|
||||||
|
|||||||
Reference in New Issue
Block a user