From 061b5bd8cb59c2c5fb54695485aa14a9fed21505 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 29 Dec 2018 03:20:18 -1100 Subject: [PATCH] Can't have burn txid onchain for selfimport --- src/rpc/crosschain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rpc/crosschain.cpp b/src/rpc/crosschain.cpp index 098076ef3..458496854 100644 --- a/src/rpc/crosschain.cpp +++ b/src/rpc/crosschain.cpp @@ -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();