Merge branch 'FSM' into jl777

This commit is contained in:
jl777
2019-02-28 03:18:51 -11:00
21 changed files with 614 additions and 401 deletions

View File

@@ -1479,8 +1479,11 @@ UniValue decodeccopret(const UniValue& params, bool fHelp)
}
std::vector<unsigned char> hex(ParseHex(params[0].get_str()));
CScript scripthex(hex.begin(),hex.end());
if (DecodeTokenOpRet(scripthex,tokenevalcode,tokenid,pubkeys,vOpretExtra)!=0 && tokenevalcode==EVAL_TOKENS && vOpretExtra.size()>0)
std::vector<std::pair<uint8_t, vscript_t>> oprets;
if (DecodeTokenOpRet(scripthex,tokenevalcode,tokenid,pubkeys, oprets)!=0 && tokenevalcode==EVAL_TOKENS && oprets.size()>0)
{
// seems we need a loop here
vOpretExtra = oprets[0].second;
UniValue obj(UniValue::VOBJ);
GetOpReturnData(scripthex,vopret);
script = (uint8_t *)vopret.data();