-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)
|
||||
{
|
||||
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);
|
||||
modifier->nHeight = nHeight;
|
||||
modifier->nVersion = 4;//1;
|
||||
@@ -115,7 +115,7 @@ void AddImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs, i
|
||||
void RemoveImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
@@ -123,6 +123,6 @@ void RemoveImportTombstone(const CTransaction &importTx, CCoinsViewCache &inputs
|
||||
int ExistsImportTombstone(const CTransaction &importTx, const CCoinsViewCache &inputs)
|
||||
{
|
||||
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);
|
||||
}
|
||||
|
||||
@@ -278,7 +278,8 @@ 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;
|
||||
|
||||
// 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 )
|
||||
throw runtime_error("selfimport couldnt find txid");
|
||||
savevout = burnTx.vout[0];
|
||||
|
||||
Reference in New Issue
Block a user