Test
This commit is contained in:
@@ -282,10 +282,7 @@ UniValue selfimport(const UniValue& params, bool fHelp)
|
||||
if ( GetTransaction(txid,burnTx,blockHash,false) == 0 )
|
||||
throw runtime_error("selfimport couldnt find txid");
|
||||
savevout = burnTx.vout[0];
|
||||
mtx.vout.resize(2);
|
||||
mtx.vout[1] = savevout;
|
||||
mtx.vout[1].nValue = burnAmount;
|
||||
vouts = mtx.vout;
|
||||
vouts = burnTx.vout;
|
||||
burnOut = MakeBurnOutput(burnAmount,0xffffffff,ASSETCHAINS_SELFIMPORT,vouts);
|
||||
mtx = burnTx;
|
||||
mtx.vout.clear();
|
||||
@@ -293,10 +290,11 @@ UniValue selfimport(const UniValue& params, bool fHelp)
|
||||
burnTx = mtx;
|
||||
if ( GetSelfimportProof(proof,burnTx,burnTx.GetHash()) < 0 )
|
||||
throw std::runtime_error("Failed validating selfimport");
|
||||
mtx.clear();
|
||||
mtx = MakeImportCoinTransaction(proof,burnTx,vouts);
|
||||
mtx.vout.resize(2);
|
||||
mtx.vout[1] = savevout;
|
||||
mtx.vout[1].nValue = burnAmount;
|
||||
//mtx.vout.resize(2);
|
||||
//mtx.vout[1] = savevout;
|
||||
//mtx.vout[1].nValue = burnAmount;
|
||||
return HexStr(E_MARSHAL(ss << mtx));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user