Test
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
|
||||
bool FSMValidate(struct CCcontract_info *cp,Eval* eval,const CTransaction &tx);
|
||||
|
||||
std::string FSMlist(uint64_t txfee);
|
||||
std::string FSMinfo(uint64_t txfee,uint256 fsmtxid);
|
||||
std::string FSMcreate(uint64_t txfee,std::string name,std::string states);
|
||||
std::string FSMList(uint64_t txfee);
|
||||
std::string FSMInfo(uint64_t txfee,uint256 fsmtxid);
|
||||
std::string FSMCreate(uint64_t txfee,std::string name,std::string states);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -146,12 +146,12 @@ uint64_t AddFSMInputs(struct CCcontract_info *cp,CMutableTransaction &mtx,CPubKe
|
||||
return(totalinputs);
|
||||
}
|
||||
|
||||
std::string FSMlist(uint64_t txfee)
|
||||
std::string FSMList(uint64_t txfee)
|
||||
{
|
||||
return(0);
|
||||
}
|
||||
|
||||
std::string FSMcreate(uint64_t txfee,std::string name,std::string states)
|
||||
std::string FSMCreate(uint64_t txfee,std::string name,std::string states)
|
||||
{
|
||||
CMutableTransaction mtx; CPubKey mypk,fsmpk; CScript opret; uint64_t inputs,CCchange=0,nValue=COIN; struct CCcontract_info *cp,C;
|
||||
cp = CCinit(&C,EVAL_FSM);
|
||||
@@ -171,7 +171,7 @@ std::string FSMcreate(uint64_t txfee,std::string name,std::string states)
|
||||
return(0);
|
||||
}
|
||||
|
||||
std::string FSMinfo(uint64_t txfee,uint256 fsmtxid)
|
||||
std::string FSMInfo(uint64_t txfee,uint256 fsmtxid)
|
||||
{
|
||||
CMutableTransaction mtx; CPubKey mypk,fsmpk; uint64_t funds = 0; CScript opret; struct CCcontract_info *cp,C;
|
||||
cp = CCinit(&C,EVAL_FSM);
|
||||
|
||||
@@ -5094,7 +5094,7 @@ UniValue FSMcreate(const UniValue& params, bool fHelp)
|
||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||
name = params[0].get_str();
|
||||
states = params[1].get_str();
|
||||
hex = FSMcreate(0,name,states);
|
||||
hex = FSMCreate(0,name,states);
|
||||
if ( hex.size() > 0 )
|
||||
{
|
||||
result.push_back(Pair("result", "success"));
|
||||
@@ -5120,7 +5120,7 @@ UniValue FSMinfo(const UniValue& params, bool fHelp)
|
||||
throw runtime_error("FSMinfo fundingtxid\n");
|
||||
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");
|
||||
fundingtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||
FSMtxid = Parseuint256((char *)params[0].get_str().c_str());
|
||||
return(FSMInfo(FSMtxid));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user