Set three
This commit is contained in:
@@ -482,6 +482,8 @@ UniValue MarmaraIssue(uint64_t txfee,uint8_t funcid,CPubKey receiverpk,int64_t a
|
|||||||
UniValue MarmaraSettlement(uint64_t txfee,uint256 refbatontxid)
|
UniValue MarmaraSettlement(uint64_t txfee,uint256 refbatontxid)
|
||||||
{
|
{
|
||||||
UniValue result(UniValue::VOBJ),a(UniValue::VARR); std::vector<uint256> creditloop; uint256 batontxid,createtxid,refcreatetxid,hashBlock; uint8_t funcid; int32_t numerrs=0,i,n,numvouts,matures,refmatures; int64_t amount,refamount; CPubKey senderpk,pk; std::string currency,refcurrency; CTransaction tx,batontx; char coinaddr[64],myCCaddr[64],destaddr[64],batonCCaddr[64],str[2]; struct CCcontract_info *cp,C;
|
UniValue result(UniValue::VOBJ),a(UniValue::VARR); std::vector<uint256> creditloop; uint256 batontxid,createtxid,refcreatetxid,hashBlock; uint8_t funcid; int32_t numerrs=0,i,n,numvouts,matures,refmatures; int64_t amount,refamount; CPubKey senderpk,pk; std::string currency,refcurrency; CTransaction tx,batontx; char coinaddr[64],myCCaddr[64],destaddr[64],batonCCaddr[64],str[2]; struct CCcontract_info *cp,C;
|
||||||
|
if ( txfee == 0 )
|
||||||
|
txfee = 10000;
|
||||||
cp = CCinit(&C,EVAL_MARMARA);
|
cp = CCinit(&C,EVAL_MARMARA);
|
||||||
if ( (n= MarmaraGetbatontxid(creditloop,batontxid,refbatontxid)) > 0 && batontxid == refbatontxid )
|
if ( (n= MarmaraGetbatontxid(creditloop,batontxid,refbatontxid)) > 0 && batontxid == refbatontxid )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -5679,7 +5679,7 @@ UniValue marmara_settlement(const UniValue& params, bool fHelp)
|
|||||||
if ( ensure_CCrequirements() < 0 )
|
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");
|
throw runtime_error("to use CC contracts, you need to launch daemon with valid -pubkey= for an address in your wallet\n");
|
||||||
batontxid = Parseuint256((char *)params[0].get_str().c_str());
|
batontxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
result = MarmaraSettlement(batontxid);
|
result = MarmaraSettlement(0,batontxid);
|
||||||
return(result);
|
return(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user