aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
AgeCommit message (Collapse)Author
2017-04-05Bugfix: ancestor modifed fees were incorrect for descendantsSuhas Daftuar
If prioritisetransaction was called for a tx with in-mempool descendants, the modified ancestor fee values for those descendants was incorrect. Github-Pull: #10144 Rebased-From: 9bef02e36525d0eed4e2e31678b3ff04bbb0b8cb
2017-02-16[Trivial] Update comments referencing main.cppCryptAxe
2017-02-05Merge #9578: Add missing mempool lock for CalculateMemPoolAncestorsPieter Wuille
003cd60 Add missing mempool lock for CalculateMemPoolAncestors (Matt Corallo)
2017-01-27Refactor: Remove using namespace <xxx> from src/*.cpp.Karl-Johan Alm
2017-01-23mempool: add notification for added/removed entriesWladimir J. van der Laan
Add notification signals to make it possible to subscribe to mempool changes: - NotifyEntryAdded(CTransactionRef)> - NotifyEntryRemoved(CTransactionRef, MemPoolRemovalReason)> Also add a mempool removal reason enumeration, which is passed to the removed notification based on why the transaction was removed from the mempool.
2017-01-20Add missing mempool lock for CalculateMemPoolAncestorsMatt Corallo
2017-01-16Merge #9380: Separate different uses of minimum feesWladimir J. van der Laan
eb30d1a Introduce -dustrelayfee (Alex Morcos) 7b1add3 Introduce -incrementalrelayfee (Alex Morcos) daec955 Introduce -blockmintxfee (Alex Morcos)
2017-01-16Introduce -incrementalrelayfeeAlex Morcos
2017-01-10Fix use-after-free in CTxMemPool::removeConflicts()Suhas Daftuar
2017-01-04Pass pointers to existing CTxMemPoolEntries to fee estimationAlex Morcos
2017-01-04Always update fee estimates on new blocks.Alex Morcos
All decisions about whether the transactions are valid data points are made at the time the transaction arrives. Updating on blocks all the time will now cause stale fee estimates to decay quickly when we restart a node.
2017-01-04rename bool to validFeeEstimateAlex Morcos
2017-01-04Remove member variable hadNoDependencies from CTxMemPoolEntryAlex Morcos
Fee estimation can just check its own mapMemPoolTxs to determine the same information. Note that now fee estimation for block processing must happen before those transactions are removed, but this shoudl be a speedup.
2017-01-04Merge #9288: Fix a bug if the min fee is 0 for FeeFilterRounderWladimir J. van der Laan
f8d43b8 Avoid rollingMinimumFeeRate never being able to decay below half (Alex Morcos) eab8e1b fix a bug if the min fee is 0 for FeeFilterRounder (Alex Morcos)
2017-01-04Merge #9283: A few more CTransactionRef optimizationsWladimir J. van der Laan
91335ba Remove unused MakeTransactionRef overloads (Pieter Wuille) 6713f0f Make FillBlock consume txn_available to avoid shared_ptr copies (Pieter Wuille) 62607d7 Convert COrphanTx to keep a CTransactionRef (Pieter Wuille) c44e4c4 Make AcceptToMemoryPool take CTransactionRef (Pieter Wuille)
2016-12-31Increment MIT Licence copyright header year on files modified in 2016isle2983
Edited via: $ contrib/devtools/copyright_header.py update .
2016-12-21Make AcceptToMemoryPool take CTransactionRefPieter Wuille
2016-12-20Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ↵Wladimir J. van der Laan
ATMP cee1612 reduce number of lookups in TransactionWithinChainLimit (Gregory Sanders) af9bedb Test for fix of txn chaining in wallet (Gregory Sanders) 5882c09 CreateTransaction: Don't return success with too-many-ancestor txn (Gregory Sanders) 0b2294a SelectCoinsMinConf: Prefer coins with fewer ancestors (Gregory Sanders)
2016-12-19reduce number of lookups in TransactionWithinChainLimitGregory Sanders
2016-12-13SelectCoinsMinConf: Prefer coins with fewer ancestorsGregory Sanders
2016-12-08Avoid rollingMinimumFeeRate never being able to decay below halfAlex Morcos
2016-12-05remove internal tracking of mempool conflicts for reporting to walletAlex Morcos
2016-12-05remove external usage of mempool conflict trackingAlex Morcos
2016-12-02Rename the remaining main.{h,cpp} to validation.{h,cpp}Matt Corallo
2016-11-19Introduce convenience type CTransactionRefPieter Wuille
2016-11-19Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille
2016-11-07Remove priority estimationAlex Morcos
2016-10-30Add feedelta to TxMempoolInfoPieter Wuille
2016-10-21Return shared_ptr<CTransaction> from mempool removesPieter Wuille
2016-10-21Make removed and conflicted arguments optional to removePieter Wuille
2016-10-21Bypass removeRecursive in removeForReorgPieter Wuille
2016-10-17Kill insecure_random and associated global stateWladimir J. van der Laan
There are only a few uses of `insecure_random` outside the tests. This PR replaces uses of insecure_random (and its accompanying global state) in the core code with an FastRandomContext that is automatically seeded on creation. This is meant to be used for inner loops. The FastRandomContext can be in the outer scope, or the class itself, then rand32() is used inside the loop. Useful e.g. for pushing addresses in CNode or the fee rounding, or randomization for coin selection. As a context is created per purpose, thus it gets rid of cross-thread unprotected shared usage of a single set of globals, this should also get rid of the potential race conditions. - I'd say TxMempool::check is not called enough to warrant using a special fast random context, this is switched to GetRand() (open for discussion...) - The use of `insecure_rand` in ConnectThroughProxy has been replaced by an atomic integer counter. The only goal here is to have a different credentials pair for each connection to go on a different Tor circuit, it does not need to be random nor unpredictable. - To avoid having a FastRandomContext on every CNode, the context is passed into PushAddress as appropriate. There remains an insecure_random for test usage in `test_random.h`.
2016-10-04Use cmpctblock type 2 for segwit-enabled transferPieter Wuille
Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar.
2016-09-27Do not shadow variablesPavel Janík
2016-08-25Remove unused variablesMarcoFalke
2016-08-01Merge #8346: Mempool: Use Consensus::CheckTxInputs direclty over ↵Pieter Wuille
main::CheckInputs a6cc299 Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputs (Jorge Timón)
2016-07-29Mempool: Use Consensus::CheckTxInputs direclty over main::CheckInputsJorge Timón
2016-07-19Treat high-sigop transactions as larger rather than rejecting themPieter Wuille
2016-07-18Rename "block cost" to "block weight"Suhas Daftuar
2016-06-22BIP141: Other consensus critical limits, and BIP145Pieter Wuille
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-19Provide a flat list of txid/terators to txn in CTxMemPoolMatt Corallo
2016-06-19Stop trimming when mapTx is emptyPieter Wuille
2016-06-07Get rid of CTxMempool::lookup() entirelyPieter Wuille
2016-06-05Switch CTransaction storage in mempool to std::shared_ptrPieter Wuille
2016-06-03Merge #7997: replace mapNextTx with slimmer setSpendsPieter Wuille
9805f4a mapNextTx: use pointer as key, simplify value (Kaz Wesley)
2016-06-02mapNextTx: use pointer as key, simplify valueKaz Wesley
Saves about 10% of application memory usage once the mempool warms up. Since the mempool is DynamicUsage-regulated, this will translate to a larger mempool in the same amount of space. Map value type: eliminate the vin index; no users of the map need to know which input of the transaction is spending the prevout. Map key type: replace the COutPoint with a pointer to a COutPoint. A COutPoint is 36 bytes, but each COutPoint is accessible from the same map entry's value. A trivial DereferencingComparator functor allows indirect map keys, but the resulting syntax is misleading: `map.find(&outpoint)`. Implement an indirectmap that acts as a wrapper to a map that uses a DereferencingComparator, supporting a syntax that accurately reflect the container's semantics: inserts and iterators use pointers since they store pointers and need them to remain constant and dereferenceable, but lookup functions take const references.
2016-05-25Do not use mempool for GETDATA for tx accepted after the last mempool req.Gregory Maxwell
The ability to GETDATA a transaction which has not (yet) been relayed is a privacy loss vector. The use of the mempool for this was added as part of the mempool p2p message and is only needed to fetch transactions returned by it.
2016-05-09Merge #7976: Remove obsolete reference to CValidationState from UpdateCoins.Wladimir J. van der Laan
c8b9248 Remove obsolete reference to CValidationState from UpdateCoins. (21E14)
2016-05-05Merge #7840: Several performance and privacy improvements to inv/mempool ↵Wladimir J. van der Laan
handling b559914 Move bloom and feerate filtering to just prior to tx sending. (Gregory Maxwell) 4578215 Return mempool queries in dependency order (Pieter Wuille) ed70683 Handle mempool requests in send loop, subject to trickle (Pieter Wuille) dc13dcd Split up and optimize transaction and block inv queues (Pieter Wuille) f2d3ba7 Eliminate TX trickle bypass, sort TX invs for privacy and priority. (Gregory Maxwell)
2016-04-30Remove obsolete reference to CValidationState from UpdateCoins.21E14