We do not support coin imports
This commit is contained in:
@@ -557,8 +557,6 @@ CAmount CCoinsViewCache::GetValueIn(int32_t nHeight,int64_t *interestp,const CTr
|
||||
CAmount value,nResult = 0;
|
||||
if ( interestp != 0 )
|
||||
*interestp = 0;
|
||||
//if ( tx.IsCoinImport() )
|
||||
// return GetCoinImportValue(tx);
|
||||
if ( tx.IsCoinBase() != 0 )
|
||||
return 0;
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
@@ -616,7 +614,7 @@ double CCoinsViewCache::GetPriority(const CTransaction &tx, int nHeight) const
|
||||
// use the maximum priority for all (partially or fully) shielded transactions.
|
||||
// (Note that coinbase transactions cannot contain Sapling shielded Spends or Outputs.)
|
||||
|
||||
if (tx.vShieldedSpend.size() > 0 || tx.vShieldedOutput.size() > 0 || tx.IsCoinImport() ) { // || tx.IsPegsImport()) {
|
||||
if (tx.vShieldedSpend.size() > 0 || tx.vShieldedOutput.size() > 0 ) {
|
||||
return MAX_PRIORITY;
|
||||
}
|
||||
|
||||
|
||||
12
src/main.cpp
12
src/main.cpp
@@ -817,7 +817,7 @@ bool hush_dailysnapshot(int32_t height)
|
||||
{
|
||||
uint256 blockhash; CTransaction txin;
|
||||
//if (tx.IsPegsImport() && j==0) continue;
|
||||
if ( !tx.IsCoinImport() && !tx.IsCoinBase() && myGetTransaction(tx.vin[j].prevout.hash,txin,blockhash) )
|
||||
if ( !tx.IsCoinBase() && myGetTransaction(tx.vin[j].prevout.hash,txin,blockhash) )
|
||||
{
|
||||
int vout = tx.vin[j].prevout.n;
|
||||
if ( ExtractDestination(txin.vout[vout].scriptPubKey, vDest) )
|
||||
@@ -1180,7 +1180,7 @@ unsigned int GetLegacySigOpCount(const CTransaction& tx)
|
||||
|
||||
unsigned int GetP2SHSigOpCount(const CTransaction& tx, const CCoinsViewCache& inputs)
|
||||
{
|
||||
if (tx.IsCoinBase() || tx.IsCoinImport())
|
||||
if (tx.IsCoinBase())
|
||||
return 0;
|
||||
|
||||
unsigned int nSigOps = 0;
|
||||
@@ -1889,7 +1889,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
// Keep track of transactions that spend a coinbase, which we re-scan
|
||||
// during reorgs to ensure COINBASE_MATURITY is still met.
|
||||
bool fSpendsCoinbase = false;
|
||||
if (!tx.IsCoinImport()) { // && !tx.IsPegsImport()) {
|
||||
BOOST_FOREACH(const CTxIn &txin, tx.vin) {
|
||||
const CCoins *coins = view.AccessCoins(txin.prevout.hash);
|
||||
if (coins->IsCoinBase()) {
|
||||
@@ -1897,7 +1896,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Grab the branch ID we expect this transaction to commit to. We don't
|
||||
// yet know if it does, but if the entry gets added to the mempool, then
|
||||
// it has passed ContextualCheckInputs and therefore this is correct.
|
||||
@@ -1927,7 +1925,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
// Continuously rate-limit free (really, very-low-fee) transactions
|
||||
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
||||
// be annoying or make others' transactions take longer to confirm.
|
||||
if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize) && !tx.IsCoinImport() )
|
||||
if (fLimitFree && nFees < ::minRelayTxFee.GetFee(nSize) )
|
||||
{
|
||||
static CCriticalSection csFreeLimiter;
|
||||
static double dFreeCount;
|
||||
@@ -1998,8 +1996,7 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
LOCK(pool.cs);
|
||||
// Store transaction in memory
|
||||
pool.addUnchecked(hash, entry, !IsInitialBlockDownload());
|
||||
if (!tx.IsCoinImport())
|
||||
{
|
||||
|
||||
// Add memory address index
|
||||
if (fAddressIndex) {
|
||||
pool.addAddressIndex(entry, view);
|
||||
@@ -2011,7 +2008,6 @@ bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransa
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -120,13 +120,12 @@ bool CTxMemPool::addUnchecked(const uint256& hash, const CTxMemPoolEntry &entry,
|
||||
const CTransaction& tx = mapTx.find(hash)->GetTx();
|
||||
mapRecentlyAddedTx[tx.GetHash()] = &tx;
|
||||
nRecentlyAddedSequence += 1;
|
||||
if (!tx.IsCoinImport()) {
|
||||
|
||||
for (unsigned int i = 0; i < tx.vin.size(); i++)
|
||||
{
|
||||
//if (tx.IsPegsImport() && i==0) continue;
|
||||
mapNextTx[tx.vin[i].prevout] = CInPoint(&tx, i);
|
||||
}
|
||||
}
|
||||
|
||||
for (const SpendDescription &spendDescription : tx.vShieldedSpend) {
|
||||
mapSaplingNullifiers[spendDescription.nullifier] = &tx;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user