Can't have burn txid onchain for selfimport

This commit is contained in:
jl777
2018-12-29 03:20:18 -11:00
parent 8ba558a7c2
commit 061b5bd8cb

View File

@@ -278,12 +278,12 @@ UniValue selfimport(const UniValue& params, bool fHelp)
"creates signed selfimport transaction from txid");
txid = Parseuint256((char *)params[0].get_str().c_str());
burnAmount = atof(params[1].get_str().c_str()) * COIN + 0.00000000499999;
if ( GetTransaction(txid,burnTx,blockHash,false) == 0 )
throw runtime_error("selfimport couldnt find txid");
((uint_8 *)&txid)[0] = 0; //make burntx but dont confirm it, it needs to be as if it was from a different chain
if ( GetSelfimportProof(proof,burnTx,txid) < 0 )
throw std::runtime_error("Failed validating selfimport");
burnOut = MakeBurnOutput(burnAmount,0xffffffff,ASSETCHAINS_SELFIMPORT,burnTx.vout);
mtx = MakeImportCoinTransaction(proof,burnTx,burnTx.vout);
mtx.vout.clear();