|
|
@ -8045,14 +8045,21 @@ UniValue opreturn_burn(const UniValue& params, bool fHelp) |
|
|
|
int64_t normalInputs = AddNormalinputs(mtx, myPubkey, nAmount, 60); |
|
|
|
if (normalInputs < nAmount) |
|
|
|
throw runtime_error("not enough normals\n"); |
|
|
|
|
|
|
|
CScript opret; uint8_t *ptr; |
|
|
|
|
|
|
|
CScript opret; uint8_t scripthex[8192]; |
|
|
|
|
|
|
|
decode_hex(scripthex,strHex.size()/2,(char *)strHex.c_str()); |
|
|
|
std::string test; |
|
|
|
test.append((char*)scripthex); |
|
|
|
std::vector<uint8_t> opretdata(test.begin(), test.end()); |
|
|
|
opret << OP_RETURN << E_MARSHAL(ss << opretdata); |
|
|
|
/*CScript opret; uint8_t *ptr;
|
|
|
|
opret << OP_RETURN << 0; |
|
|
|
int32_t len = strlen(strHex.c_str()); |
|
|
|
len >>=1; |
|
|
|
opret.resize(len+2); |
|
|
|
ptr = (uint8_t *)&opret[1]; |
|
|
|
decode_hex(ptr,len,(char *)strHex.c_str()); |
|
|
|
decode_hex(ptr,len,(char *)strHex.c_str()); */ |
|
|
|
mtx.vout.push_back(CTxOut(nAmount,opret)); |
|
|
|
ret.push_back(Pair("hex",FinalizeCCTx(0, cp, mtx, myPubkey, 10000, CScript()))); |
|
|
|
return(ret); |
|
|
|