Added CCaddr1of2set and FinalizeCCtx modified to support it

(small test CCerror code added - temp)
This commit is contained in:
dimxy
2019-01-07 23:21:57 +05:00
parent 8e8a94404f
commit be71d108b2
6 changed files with 100 additions and 42 deletions

View File

@@ -6952,12 +6952,20 @@ UniValue tokenlist(const UniValue& params, bool fHelp)
UniValue tokeninfo(const UniValue& params, bool fHelp)
{
#ifdef TESTMODE
std::cerr << "is CCerror clear? CCerror=" << CCerror << std::endl;
#endif
uint256 tokenid;
if ( fHelp || params.size() != 1 )
throw runtime_error("tokeninfo tokenid\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");
tokenid = Parseuint256((char *)params[0].get_str().c_str());
#ifdef TESTMODE
CCerror = "test error";
#endif
return(AssetInfo(tokenid));
}