-prints
This commit is contained in:
@@ -104,7 +104,7 @@ bool VerifyCoinImport(const CScript& scriptSig, TransactionSignatureChecker& che
|
|||||||
void AddImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs, int nHeight)
|
void AddImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs, int nHeight)
|
||||||
{
|
{
|
||||||
uint256 burnHash = importTx.vin[0].prevout.hash;
|
uint256 burnHash = importTx.vin[0].prevout.hash;
|
||||||
fprintf(stderr,"add tombstone.(%s)\n",burnHash.GetHex().c_str());
|
//fprintf(stderr,"add tombstone.(%s)\n",burnHash.GetHex().c_str());
|
||||||
CCoinsModifier modifier = inputs.ModifyCoins(burnHash);
|
CCoinsModifier modifier = inputs.ModifyCoins(burnHash);
|
||||||
modifier->nHeight = nHeight;
|
modifier->nHeight = nHeight;
|
||||||
modifier->nVersion = 4;//1;
|
modifier->nVersion = 4;//1;
|
||||||
@@ -115,7 +115,7 @@ void AddImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs, i
|
|||||||
void RemoveImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs)
|
void RemoveImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs)
|
||||||
{
|
{
|
||||||
uint256 burnHash = importTx.vin[0].prevout.hash;
|
uint256 burnHash = importTx.vin[0].prevout.hash;
|
||||||
fprintf(stderr,"remove tombstone.(%s)\n",burnHash.GetHex().c_str());
|
//fprintf(stderr,"remove tombstone.(%s)\n",burnHash.GetHex().c_str());
|
||||||
inputs.ModifyCoins(burnHash)->Clear();
|
inputs.ModifyCoins(burnHash)->Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -123,6 +123,6 @@ void RemoveImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs
|
|||||||
int ExistsImportTombstone(const CTransaction &importTx, const CCoinsViewCache &inputs)
|
int ExistsImportTombstone(const CTransaction &importTx, const CCoinsViewCache &inputs)
|
||||||
{
|
{
|
||||||
uint256 burnHash = importTx.vin[0].prevout.hash;
|
uint256 burnHash = importTx.vin[0].prevout.hash;
|
||||||
fprintf(stderr,"check tombstone.(%s) in %s\n",burnHash.GetHex().c_str(),importTx.GetHash().GetHex().c_str());
|
//fprintf(stderr,"check tombstone.(%s) in %s\n",burnHash.GetHex().c_str(),importTx.GetHash().GetHex().c_str());
|
||||||
return inputs.HaveCoins(burnHash);
|
return inputs.HaveCoins(burnHash);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,7 +278,8 @@ UniValue selfimport(const UniValue& params, bool fHelp)
|
|||||||
"creates signed selfimport transaction from txid");
|
"creates signed selfimport transaction from txid");
|
||||||
txid = Parseuint256((char *)params[0].get_str().c_str());
|
txid = Parseuint256((char *)params[0].get_str().c_str());
|
||||||
burnAmount = atof(params[1].get_str().c_str()) * COIN + 0.00000000499999;
|
burnAmount = atof(params[1].get_str().c_str()) * COIN + 0.00000000499999;
|
||||||
|
// txid is just used to specify the import recv address
|
||||||
|
// in reality it would be rawtx from the other chain
|
||||||
if ( GetTransaction(txid,burnTx,blockHash,false) == 0 )
|
if ( GetTransaction(txid,burnTx,blockHash,false) == 0 )
|
||||||
throw runtime_error("selfimport couldnt find txid");
|
throw runtime_error("selfimport couldnt find txid");
|
||||||
savevout = burnTx.vout[0];
|
savevout = burnTx.vout[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user