Delete many things we do not want or need
This commit is contained in:
26
src/main.cpp
26
src/main.cpp
@@ -21,7 +21,6 @@
|
||||
#include "sodium.h"
|
||||
#include "addrman.h"
|
||||
#include "arith_uint256.h"
|
||||
#include "importcoin.h"
|
||||
#include "chainparams.h"
|
||||
#include "checkpoints.h"
|
||||
#include "checkqueue.h"
|
||||
@@ -1850,11 +1849,12 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
return state.Invalid(false, REJECT_DUPLICATE, "already have coins");
|
||||
}
|
||||
|
||||
if (tx.IsCoinImport() || tx.IsPegsImport()) {
|
||||
// Inverse of normal case; if input exists, it's been spent
|
||||
if (ExistsImportTombstone(tx, view))
|
||||
return state.Invalid(false, REJECT_DUPLICATE, "import tombstone exists");
|
||||
} else {
|
||||
//if (tx.IsCoinImport() || tx.IsPegsImport()) {
|
||||
// // Inverse of normal case; if input exists, it's been spent
|
||||
// if (ExistsImportTombstone(tx, view))
|
||||
// return state.Invalid(false, REJECT_DUPLICATE, "import tombstone exists");
|
||||
//} else
|
||||
{
|
||||
// do all inputs exist?
|
||||
// Note that this does not check for the presence of actual outputs (see the next check for that),
|
||||
// and only helps with filling in pfMissingInputs (to determine missing vs spent).
|
||||
@@ -2599,10 +2599,10 @@ void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, CTxUndo &txund
|
||||
inputs.ModifyCoins(tx.GetHash())->FromTx(tx, nHeight); // add outputs
|
||||
|
||||
// Unorthodox state
|
||||
if (tx.IsCoinImport() || tx.IsPegsImport()) {
|
||||
// add a tombstone for the burnTx
|
||||
AddImportTombstone(tx, inputs, nHeight);
|
||||
}
|
||||
//if (tx.IsCoinImport() || tx.IsPegsImport()) {
|
||||
// // add a tombstone for the burnTx
|
||||
// AddImportTombstone(tx, inputs, nHeight);
|
||||
//}
|
||||
}
|
||||
|
||||
void UpdateCoins(const CTransaction& tx, CCoinsViewCache& inputs, int nHeight)
|
||||
@@ -2643,11 +2643,13 @@ namespace Consensus {
|
||||
CAmount nFees = 0;
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
/*
|
||||
if (tx.IsPegsImport() && i==0)
|
||||
{
|
||||
nValueIn=GetCoinImportValue(tx);
|
||||
continue;
|
||||
}
|
||||
*/
|
||||
const COutPoint &prevout = tx.vin[i].prevout;
|
||||
const CCoins *coins = inputs.AccessCoins(prevout.hash);
|
||||
assert(coins);
|
||||
@@ -2771,12 +2773,14 @@ bool ContextualCheckInputs(
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
if (tx.IsCoinImport() || tx.IsPegsImport())
|
||||
{
|
||||
LOCK(cs_main);
|
||||
ServerTransactionSignatureChecker checker(&tx, 0, 0, false, txdata);
|
||||
return VerifyCoinImport(tx.vin[0].scriptSig, checker, state);
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -3051,10 +3055,12 @@ bool DisconnectBlock(CBlock& block, CValidationState& state, CBlockIndex* pindex
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if (tx.IsCoinImport() || tx.IsPegsImport())
|
||||
{
|
||||
RemoveImportTombstone(tx, view);
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
// set the old best Sprout anchor back
|
||||
|
||||
Reference in New Issue
Block a user