aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | Fixed multiple typosDimitris Tsapakidis2017-06-221-1/+1
| | |/ | |/| | | | | | | | | | | | | | | | A few "a->an" and "an->a". "Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences. "without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command". Removed duplicate words such as "the the".
* | | Merge #10537: Few Minor per-utxo assert-semantics re-adds and tweakPieter Wuille2017-06-201-3/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | | | | 9417d7a33 Be much more agressive in AccessCoin docs. (Matt Corallo) f58349ca8 Restore some assert semantics in sigop cost calculations (Matt Corallo) 3533fb4d3 Return a bool in SpendCoin to restore pre-per-utxo assert semantics (Matt Corallo) ec1271f2b Remove useless mapNextTx lookup in CTxMemPool::TrimToSize. (Matt Corallo) Tree-SHA512: 158a4bce063eac93e1d50709500a10a7cb1fb3271f10ed445d701852fce713e2bf0da3456088e530ab005f194ef4a2adf0c7cb23226b160cecb37a79561f29ca
| * | Remove useless mapNextTx lookup in CTxMemPool::TrimToSize.Matt Corallo2017-06-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prior to per-utxo CCoins, we checked that no other in-mempool tx spent any of the given transaction's outputs, as we don't want to uncache that entire tx in such a case. However, we now are checking only that there exists no other mempool spends of the same output, which should clearly be impossible after we removed the transaction which was spending said output (barring massive mempool inconsistency). Thanks to @sdaftuar for the suggestion.
* | | scripted-diff: Fully remove BOOST_FOREACHJorge Timón2017-06-051-27/+27
|/ / | | | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
* | Merge #10195: Switch chainstate db and cache to per-txout modelPieter Wuille2017-06-011-27/+24
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 589827975 scripted-diff: various renames for per-utxo consistency (Pieter Wuille) a5e02bc7f Increase travis unit test timeout (Pieter Wuille) 73de2c1ff Rename CCoinsCacheEntry::coins to coin (Pieter Wuille) 119e552f7 Merge CCoinsViewCache's GetOutputFor and AccessCoin (Pieter Wuille) 580b02309 [MOVEONLY] Move old CCoins class to txdb.cpp (Pieter Wuille) 8b25d2c0c Upgrade from per-tx database to per-txout (Pieter Wuille) b2af357f3 Reduce reserved memory space for flushing (Pieter Wuille) 41aa5b79a Pack Coin more tightly (Pieter Wuille) 97072d668 Remove unused CCoins methods (Pieter Wuille) ce23efaa5 Extend coins_tests (Pieter Wuille) 508307968 Switch CCoinsView and chainstate db from per-txid to per-txout (Pieter Wuille) 4ec0d9e79 Refactor GetUTXOStats in preparation for per-COutPoint iteration (Pieter Wuille) 13870b56f Replace CCoins-based CTxMemPool::pruneSpent with isSpent (Pieter Wuille) 05293f3cb Remove ModifyCoins/ModifyNewCoins (Pieter Wuille) 961e48397 Switch tests from ModifyCoins to AddCoin/SpendCoin (Pieter Wuille) 8b3868c1b Switch CScriptCheck to use Coin instead of CCoins (Pieter Wuille) c87b957a3 Only pass things committed to by tx's witness hash to CScriptCheck (Matt Corallo) f68cdfe92 Switch from per-tx to per-txout CCoinsViewCache methods in some places (Pieter Wuille) 000391132 Introduce new per-txout CCoinsViewCache functions (Pieter Wuille) bd83111a0 Optimization: Coin&& to ApplyTxInUndo (Pieter Wuille) cb2c7fdac Replace CTxInUndo with Coin (Pieter Wuille) 422634e2f Introduce Coin, a single unspent output (Pieter Wuille) 7d991b55d Store/allow tx metadata in all undo records (Pieter Wuille) c3aa0c119 Report on-disk size in gettxoutsetinfo (Pieter Wuille) d34242430 Remove/ignore tx version in utxo and undo (Pieter Wuille) 7e0032290 Add specialization of SipHash for 256 + 32 bit data (Pieter Wuille) e484652fc Introduce CHashVerifier to hash read data (Pieter Wuille) f54580e7e error() in disconnect for disk corruption, not inconsistency (Pieter Wuille) e66dbde6d Add SizeEstimate to CDBBatch (Pieter Wuille) Tree-SHA512: ce1fb1e40c77d38915cd02189fab7a8b125c7f44d425c85579d872c3bede3a437760997907c99d7b3017ced1c2de54b2ac7223d99d83a6658fe5ef61edef1de3
| * | scripted-diff: various renames for per-utxo consistencyPieter Wuille2017-06-011-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to John Newberry for pointing these out. -BEGIN VERIFY SCRIPT- sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h -END VERIFY SCRIPT-
| * | Switch CCoinsView and chainstate db from per-txid to per-txoutPieter Wuille2017-06-011-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes several related changes: * Changes the CCoinsView virtual methods (GetCoins, HaveCoins, ...) to be COutPoint/Coin-based rather than txid/CCoins-based. * Changes the chainstate db to a new incompatible format that is also COutPoint/Coin based. * Implements reconstruction code for hash_serialized_2. * Adapts the coins_tests unit tests (thanks to Russell Yanofsky). A side effect of the new CCoinsView model is that we can no longer use the (unreliable) test for transaction outputs in the UTXO set to determine whether we already have a particular transaction.
| * | Replace CCoins-based CTxMemPool::pruneSpent with isSpentPieter Wuille2017-06-011-9/+2
| | |
* | | Merge #9208: Improve DisconnectTip performanceWladimir J. van der Laan2017-05-301-1/+1
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | c1235e3 Add RecursiveDynamicUsage overload for std::shared_ptr (Russell Yanofsky) 71f1903 Store disconnected block transactions outside mempool during reorg (Suhas Daftuar) 9decd64 [qa] Relax assumptions on mempool behavior during reorg (Suhas Daftuar) Tree-SHA512: c160ad853a5cd060d0307af7606a0c77907497ed7033c9599b95e73d83f68fdfcd4214bd8a83db1c5b7a58022722b9de1ed2e6ea2e02f38a7b6c717f079dd0c6
| * | Add RecursiveDynamicUsage overload for std::shared_ptrRussell Yanofsky2017-05-041-1/+1
| |/ | | | | | | This simplifies a few usage expressions.
* | Merge #8329: Consensus: MOVEONLY: Move functions for tx verificationWladimir J. van der Laan2017-05-181-0/+1
|\ \ | | | | | | | | | | | | | | | 618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón) Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497
| * | MOVEONLY: tx functions to consensus/tx_verify.oJorge Timón2017-04-061-0/+1
| | | | | | | | | | | | Functions related to transaction verification.
* | | Merge #10196: Bugfix: PrioritiseTransaction updates the mempool tx counterPieter Wuille2017-05-171-0/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 6c2e25c [qa] Test prioritise_transaction / getblocktemplate interaction (Suhas Daftuar) acc2e4b Bugfix: PrioritiseTransaction updates the mempool tx counter (Suhas Daftuar) Tree-SHA512: dcf834df52d84d5eb86acb847c3f28d3cffd1f78f3092b8ff8913c2c400675a071c48a19cd852fdbaac1582aa1dba23433e0e16055831ef2a5e76dde91199941
| * | | Bugfix: PrioritiseTransaction updates the mempool tx counterSuhas Daftuar2017-05-061-0/+1
| | |/ | |/| | | | | | | | | | The mempool's nTransactionsUpdated is used by getblocktemplate to trigger new invocations of CreateNewBlock().
* / | Track failures in fee estimation.Alex Morcos2017-05-101-1/+1
|/ / | | | | | | | | | | Start tracking transactions which fail to confirm within the target and are then evicted or otherwise leave mempool. Fix slight error in unit test.
* | Read and Write fee estimate file directly from CBlockPolicyEstimatorAlex Morcos2017-04-101-34/+0
| |
* | Call estimate(Smart)Fee directly from CBlockPolicyEstimatorAlex Morcos2017-04-101-9/+0
| |
* | Give CBlockPolicyEstimator it's own lockAlex Morcos2017-04-101-4/+0
| |
* | Make feeEstimator its own global instance of CBlockPolicyEstimatorAlex Morcos2017-04-101-12/+5
|/
* Bugfix: ancestor modifed fees were incorrect for descendantsSuhas Daftuar2017-04-031-0/+7
| | | | | | If prioritisetransaction was called for a tx with in-mempool descendants, the modified ancestor fee values for those descendants was incorrect.
* Change LogAcceptCategory to use uint32_t rather than sets of strings.Gregory Maxwell2017-04-011-3/+4
| | | | | | | | | | | | | | | | | This changes the logging categories to boolean flags instead of strings. This simplifies the acceptance testing by avoiding accessing a scoped static thread local pointer to a thread local set of strings. It eliminates the only use of boost::thread_specific_ptr outside of lockorder debugging. This change allows log entries to be directed to multiple categories and makes it easy to change the logging flags at runtime (e.g. via an RPC, though that isn't done by this commit.) It also eliminates the fDebug global. Configuration of unknown logging categories now produces a warning.
* Fix parameter naming inconsistencies between .h and .cpp filespracticalswift2017-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | Inconsistencies prior to this commit: * serializeFlags vs serialFlags src/core_io.h:std::string EncodeHexTx(const CTransaction& tx, const int serializeFlags = 0); src/core_write.cpp:std::string EncodeHexTx(const CTransaction& tx, const int serialFlags) * statusOut vs outStatus src/rpc/server.h:bool RPCIsInWarmup(std::string *statusOut); src/rpc/server.cpp:bool RPCIsInWarmup(std::string *outStatus) * hashesToUpdate vs vHashesToUpdate src/txmempool.h: void UpdateTransactionsFromBlock(const std::vector<uint256> &hashesToUpdate); src/txmempool.cpp:void CTxMemPool::UpdateTransactionsFromBlock(const std::vector<uint256> &vHashesToUpdate) * nPruneUpToHeight vs nManualPruneHeight src/validation.h:void PruneBlockFilesManual(int nPruneUpToHeight); src/validation.cpp:void PruneBlockFilesManual(int nManualPruneHeight);
* Merge #9548: Remove min reasonable feeWladimir J. van der Laan2017-03-071-2/+2
|\ | | | | | | | | | | | | | | ad82cb0 Remove unnecessary min fee argument in CTxMemPool constructor (Alex Morcos) 2a7b56c CBlockPolicyEstimator now uses hard coded minimum bucket feerate (Alex Morcos) ac9d3d2 Change fee estimation bucket limit variable names (Alex Morcos) Tree-SHA512: 6e3bc7df3497ed60c7620845d222063e33a0238020f5c3316e61e0eff758078588ea8dd51196ceb59aa561ba106f8cdae62cebe521adb3247108bb49f15252d6
| * Remove unnecessary min fee argument in CTxMemPool constructorAlex Morcos2017-01-171-1/+1
| |
| * CBlockPolicyEstimator now uses hard coded minimum bucket feerateAlex Morcos2017-01-171-1/+1
| |
* | [cleanup] Remove coin age priority completely.Alex Morcos2017-03-031-17/+2
| | | | | | | | Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
* | [rpc] Remove priorityDelta from prioritisetransactionAlex Morcos2017-03-031-15/+13
| | | | | | | | This a breaking API change to the prioritisetransaction RPC call which previously required exactly three arguments and now requires exactly two (hash and feeDelta). The function prioritiseTransaction is also updated.
* | [cleanup] Remove estimatePriority and estimateSmartPriorityAlex Morcos2017-02-271-10/+0
| | | | | | | | Unused everywhere now except one test.
* | Removed redundant parameter from mempool.PrioritiseTransactiongubatron2017-02-211-2/+2
| | | | | | | | (Also made the `const uint256 hash` parameter a `const uint256& hash` as suggested by @sdaftuar)
* | [Trivial] Update comments referencing main.cppCryptAxe2017-02-161-1/+1
| |
* | Merge #9578: Add missing mempool lock for CalculateMemPoolAncestorsPieter Wuille2017-02-051-0/+2
|\ \ | | | | | | | | | 003cd60 Add missing mempool lock for CalculateMemPoolAncestors (Matt Corallo)
| * | Add missing mempool lock for CalculateMemPoolAncestorsMatt Corallo2017-01-201-0/+2
| |/
* | Refactor: Remove using namespace <xxx> from src/*.cpp.Karl-Johan Alm2017-01-271-5/+3
| |
* | mempool: add notification for added/removed entriesWladimir J. van der Laan2017-01-231-10/+13
|/ | | | | | | | | | | | 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.
* Merge #9380: Separate different uses of minimum feesWladimir J. van der Laan2017-01-161-4/+3
|\ | | | | | | | | | | eb30d1a Introduce -dustrelayfee (Alex Morcos) 7b1add3 Introduce -incrementalrelayfee (Alex Morcos) daec955 Introduce -blockmintxfee (Alex Morcos)
| * Introduce -incrementalrelayfeeAlex Morcos2017-01-161-4/+3
| |
* | Fix use-after-free in CTxMemPool::removeConflicts()Suhas Daftuar2017-01-101-1/+1
| |
* | Pass pointers to existing CTxMemPoolEntries to fee estimationAlex Morcos2017-01-041-2/+2
| |
* | Always update fee estimates on new blocks.Alex Morcos2017-01-041-3/+2
| | | | | | | | 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.
* | rename bool to validFeeEstimateAlex Morcos2017-01-041-4/+4
| |
* | Remove member variable hadNoDependencies from CTxMemPoolEntryAlex Morcos2017-01-041-4/+4
|/ | | | 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.
* Merge #9288: Fix a bug if the min fee is 0 for FeeFilterRounderWladimir J. van der Laan2017-01-041-1/+1
|\ | | | | | | | | 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)
| * Avoid rollingMinimumFeeRate never being able to decay below halfAlex Morcos2016-12-081-1/+1
| |
* | Merge #9283: A few more CTransactionRef optimizationsWladimir J. van der Laan2017-01-041-5/+5
|\ \ | | | | | | | | | | | | | | | | | | 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)
| * | Make AcceptToMemoryPool take CTransactionRefPieter Wuille2016-12-211-5/+5
| | |
* | | Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
|/ / | | | | | | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* | Merge #9262: Prefer coins that have fewer ancestors, sanity check txn before ↵Wladimir J. van der Laan2016-12-201-0/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | reduce number of lookups in TransactionWithinChainLimitGregory Sanders2016-12-191-3/+3
| | |
| * | SelectCoinsMinConf: Prefer coins with fewer ancestorsGregory Sanders2016-12-131-0/+7
| | |
* | | remove internal tracking of mempool conflicts for reporting to walletAlex Morcos2016-12-051-8/+3
| | |