initial commit for payments merge RPC
This commit is contained in:
@@ -70,16 +70,20 @@ int32_t has_opret(const CTransaction &tx, uint8_t evalcode)
|
||||
return 0;
|
||||
}
|
||||
|
||||
CScript getCCopret(const CScript &scriptPubKey)
|
||||
bool getCCopret(const CScript &scriptPubKey, CScript &opret)
|
||||
{
|
||||
std::vector<std::vector<unsigned char>> vParams = std::vector<std::vector<unsigned char>>();
|
||||
CScript dummy; CScript opret;
|
||||
if ( scriptPubKey.IsPayToCryptoCondition(&dummy, vParams) && vParams.size() == 1 )
|
||||
CScript dummy; bool ret = false;
|
||||
if ( scriptPubKey.IsPayToCryptoCondition(&dummy, vParams) != 0 )
|
||||
{
|
||||
//fprintf(stderr, "vparams.%s\n", HexStr(vParams[0].begin(), vParams[0].end()).c_str());
|
||||
opret = CScript(vParams[0].begin()+6, vParams[0].end());
|
||||
ret = true;
|
||||
if ( vParams.size() == 1)
|
||||
{
|
||||
opret = CScript(vParams[0].begin()+6, vParams[0].end());
|
||||
//fprintf(stderr, "vparams.%s\n", HexStr(vParams[0].begin(), vParams[0].end()).c_str());
|
||||
}
|
||||
}
|
||||
return opret;
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool makeCCopret(CScript &opret, std::vector<std::vector<unsigned char>> &vData)
|
||||
|
||||
Reference in New Issue
Block a user