aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
Commit message (Collapse)AuthorAgeFilesLines
* remove deprecated mentions of signrawtransaction from fundraw helpGregory Sanders2019-02-041-1/+2
|
* validation: Add cs_main locking annotationsMarcoFalke2018-12-221-4/+4
|
* doc: Add comment to cs_main and mempool::csMarcoFalke2018-12-201-1/+37
|
* Extract CSipHasher to it's own file in crypto/ directory.Jim Posen2018-11-051-0/+1
| | | | This is a move-only commit with the exception of changes to includes.
* doxygen: Fix member commentsMarcoFalke2018-09-261-7/+7
|
* tx pool: Use class methods to hide raw map iterator impl detailsMarcoFalke2018-09-071-2/+10
|
* Merge #13792: tx pool: Avoid passing redundant hash into addUnchecked ↵Wladimir J. van der Laan2018-08-291-10/+10
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (scripted-diff) fa587773e59721e187cadc998f4dc236ad3aef0b scripted-diff: Remove unused first argument to addUnchecked (MarcoFalke) fe5c49766c0dc5beaf186d77b568361242b20d5e tx pool: Use the entry's hash instead of the one passed to addUnchecked (MarcoFalke) ddd395f968a050be5dd0ae21ba7d189b6b7f73fd Mark CTxMemPoolEntry members that should not be modified const (MarcoFalke) Pull request description: Several years ago the transaction hash was not cached. For optimization the hash was instead passed into `addUnchecked` to avoid re-calculating it. See f77654a0e9424f13cad04f82c014abd78fbb5e38 Passing in the hash is now redundant and the argument can safely be removed. Tree-SHA512: 0206b65c7a014295f67574120e8c5397bf1b1bd70c918ae1360ab093676f7f89a6f084fd2c7000a141baebfe63fe6f515559e38c4ac71810ba64f949f9c0467f
| * scripted-diff: Remove unused first argument to addUncheckedMarcoFalke2018-07-301-2/+2
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g' -END VERIFY SCRIPT-
| * Mark CTxMemPoolEntry members that should not be modified constMarcoFalke2018-07-301-8/+8
| |
* | Move cs_main locking annotations from .cpp to .hpracticalswift2018-08-261-1/+2
| |
* | Merge #13780: 0.17: Pre-branch maintenanceWladimir J. van der Laan2018-08-081-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | 3fc20632a3ad30809356a58d2cf0ea4a4ad4cec3 qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot) 2b6a2f4a28792f2fe9dc1be843b1ff1ecae35e8a Regenerate manpages (DrahtBot) eb7daf4d600eeb631427c018a984a77a34aca66e Update copyright headers to 2018 (DrahtBot) Pull request description: Some trivial maintenance to avoid having to do it again after the 0.17 branch off. (The scripts to do this are in `./contrib/`) Tree-SHA512: 16b2af45e0351b1c691c5311d48025dc6828079e98c2aa2e600dc5910ee8aa01858ca6c356538150dc46fe14c8819ed8ec8e4ec9a0f682b9950dd41bc50518fa
| * Update copyright headers to 2018DrahtBot2018-07-271-1/+1
| |
* | refactor: Avoid locking tx pool cs thriceMarcoFalke2018-07-291-3/+3
| |
* | Return void instead of bool for functions that cannot failpracticalswift2018-07-271-2/+2
|/ | | | | | | | | | | | | | | | | * CBlockTreeDB::ReadReindexing(...) * CChainState::ResetBlockFailureFlags(...) * CTxMemPool::addUnchecked(...) * CWallet::LoadDestData(...) * CWallet::LoadKeyMetadata(...) * CWallet::LoadScriptMetadata(...) * CWallet::LoadToWallet(...) * CWallet::SetHDChain(...) * CWallet::SetHDSeed(...) * RemoveLocal(...) * SetMinVersion(...) * StartHTTPServer(...) * StartRPC(...) * TorControlConnection::Disconnect(...)
* scripted-diff: Remove trailing whitespacesJoão Barbosa2018-07-241-1/+1
| | | | | | | | -BEGIN VERIFY SCRIPT- sed --in-place'' --regexp-extended 's/[[:space:]]+$//g' $(git grep -I --files-with-matches --extended-regexp '[[:space:]]+$' -- src test ':!*.svg' ':!src/crypto/sha256_sse4*' ':!src/leveldb' ':!src/qt/locale' ':!src/secp256k1' ':!src/univalue') -END VERIFY SCRIPT-
* Avoid locking mutexes that are already held by the same threadpracticalswift2018-07-211-1/+1
|
* doc: Clarify that mempool txiter is const_iteratorMarcoFalke2018-06-241-1/+1
|
* Remove deprecated TransactionWithinChainLimitKarl-Johan Alm2018-06-111-3/+0
|
* Add GetTransactionAncestry to CTxMemPool for general purpose chain limit ↵Karl-Johan Alm2018-06-111-0/+6
| | | | checking
* mempool: Fix max descendants checkKarl-Johan Alm2018-06-111-0/+1
| | | | The chain limits check for max descendants would check the descendants of the transaction itself even though the description for -limitdescendantcount says 'any ancestor'. This commit corrects the descendant count check by finding the top parent transaction in the mempool and comparing against that.
* mempool: Add explicit max_descendantsKarl-Johan Alm2018-06-111-1/+1
| | | | | TransactionWithinChainLimits would take a 'limit' and check it against ascendants and descendants. This is changed to take an explicit max ancestors and max descendants value, and to test the corresponding value against its corresponding max.
* Add Clang thread safety analysis annotationspracticalswift2018-05-051-13/+13
|
* Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)practicalswift2018-05-051-1/+1
| | | | * writing variable 'nCheckFrequency' requires holding mutex 'cs'
* Add compile time checking for all ::mempool.cs runtime locking assertionspracticalswift2018-05-051-3/+3
|
* Merge #11742: rpc: Add testmempoolacceptWladimir J. van der Laan2018-04-021-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | b55555d rpc: Add testmempoolaccept (MarcoFalke) Pull request description: To check if a single raw transaction makes it into the current transaction pool, one had to call `sendrawtransaction`. However, on success, this adds the transaction to the mempool with no easy way to undo. The call `testmempoolaccept` is introduced to provide a way to solely check the result without changing the mempool state. Tree-SHA512: 5afd9311190135cee8fc1f229c7d39bf893f1028f29e28d34f70df820198ff97b4bf86b41cbbd6e6c36a5c30073cefa92d541c74a4939c7a2a6fa283dfd41b63
| * rpc: Add testmempoolacceptMarcoFalke2018-03-241-1/+1
| |
* | Make CTxMemPool::isSpent() constRoman Zeyde2018-03-251-1/+1
|/
* Fix typosDimitris Apostolou2018-03-211-1/+1
|
* Avoid leaking prioritization information when relaying transactionsSuhas Daftuar2018-01-251-3/+6
|
* Correct mempool mapTx commentSuhas Daftuar2018-01-191-1/+2
|
* Merge #12118: Sort mempool by min(feerate, ancestor_feerate)Wladimir J. van der Laan2018-01-151-20/+46
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0a22a52 Use mempool's ancestor sort in transaction selection (Suhas Daftuar) 7abfa53 Add test for new ancestor feerate sort behavior (Suhas Daftuar) 9a51319 Sort mempool by min(feerate, ancestor_feerate) (Suhas Daftuar) 6773f92 Refactor CompareTxMemPoolEntryByDescendantScore (Suhas Daftuar) Pull request description: This more closely approximates the desirability of a given transaction for mining, and should result in less re-sorting when transactions get removed from the mempool after being mined. I measured this as approximately a 5% speedup in removeForBlock. Tree-SHA512: ffa36b567c5dfe3e8908c545a459b6a5ec0de26e7dc81b1050dd235cac9046564b4409a3f8c5ba97bd8b30526e8fec8f78480a912e317979467f32305c3dd37b
| * Use mempool's ancestor sort in transaction selectionSuhas Daftuar2018-01-131-2/+4
| | | | | | | | | | | | | | Transaction selection for mining tracks ancestor feerates that are modified based on transactions that have already been selected. This commit de-duplicates the code so that the ancestor feerate sorting used by the mempool can also be directly applied to the miner.
| * Sort mempool by min(feerate, ancestor_feerate)Suhas Daftuar2018-01-091-7/+26
| | | | | | | | | | This more closely approximates the desirability of a given transaction for mining.
| * Refactor CompareTxMemPoolEntryByDescendantScoreSuhas Daftuar2018-01-091-12/+17
| |
* | Remove unused mempool indexSuhas Daftuar2018-01-091-8/+0
|/
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* Make boost::multi_index comparators constSuhas Daftuar2017-12-071-5/+5
| | | | This fixes compatibility with boost 1.66
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- for f in \ src/*.cpp \ src/*.h \ src/bench/*.cpp \ src/bench/*.h \ src/compat/*.cpp \ src/compat/*.h \ src/consensus/*.cpp \ src/consensus/*.h \ src/crypto/*.cpp \ src/crypto/*.h \ src/crypto/ctaes/*.h \ src/policy/*.cpp \ src/policy/*.h \ src/primitives/*.cpp \ src/primitives/*.h \ src/qt/*.cpp \ src/qt/*.h \ src/qt/test/*.cpp \ src/qt/test/*.h \ src/rpc/*.cpp \ src/rpc/*.h \ src/script/*.cpp \ src/script/*.h \ src/support/*.cpp \ src/support/*.h \ src/support/allocators/*.h \ src/test/*.cpp \ src/test/*.h \ src/wallet/*.cpp \ src/wallet/*.h \ src/wallet/test/*.cpp \ src/wallet/test/*.h \ src/zmq/*.cpp \ src/zmq/*.h do base=${f%/*}/ relbase=${base#src/} sed -i "s:#include \"\(.*\)\"\(.*\):if test -e \$base'\\1'; then echo \"#include <\"\$relbase\"\\1>\\2\"; else echo \"#include <\\1>\\2\"; fi:e" $f done -END VERIFY SCRIPT-
* Merge #10286: Call wallet notify callbacks in scheduler thread (without cs_main)Wladimir J. van der Laan2017-11-151-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 89f0312 Remove redundant pwallet nullptr check (Matt Corallo) c4784b5 Add a dev notes document describing the new wallet RPC blocking (Matt Corallo) 3ea8b75 Give ZMQ consistent order with UpdatedBlockTip on scheduler thread (Matt Corallo) cb06edf Fix wallet RPC race by waiting for callbacks in sendrawtransaction (Matt Corallo) e545ded Also call other wallet notify callbacks in scheduler thread (Matt Corallo) 17220d6 Use callbacks to cache whether wallet transactions are in mempool (Matt Corallo) 5d67a78 Add calls to CWallet::BlockUntilSyncedToCurrentChain() in RPCs (Matt Corallo) 5ee3172 Add CWallet::BlockUntilSyncedToCurrentChain() (Matt Corallo) 0b2f42d Add CallFunctionInQueue to wait on validation interface queue drain (Matt Corallo) 2b4b345 Add ability to assert a lock is not held in DEBUG_LOCKORDER (Matt Corallo) 0343676 Call TransactionRemovedFromMempool in the CScheduler thread (Matt Corallo) a7d3936 Add a CValidationInterface::TransactionRemovedFromMempool (Matt Corallo) Pull request description: Based on #10179, this effectively reverts #9583, regaining most of the original speedups of #7946. This concludes the work of #9725, #10178, and #10179. See individual commit messages for more information. Tree-SHA512: eead4809b0a75d1fb33b0765174ff52c972e45040635e38cf3686cef310859c1e6b3c00e7186cbd17374c6ae547bfbd6c1718fe36f26c76ba8a8b052d6ed7bc9
| * Add a CValidationInterface::TransactionRemovedFromMempoolMatt Corallo2017-10-131-0/+3
| | | | | | | | | | | | This is currently unused, but will by used by wallet to cache when transactions are in the mempool, obviating the need for calls to mempool from CWalletTx::InMempool()
* | Merge #11269: [Mempool] CTxMemPoolEntry::UpdateAncestorState: modifySiagOps ↵MarcoFalke2017-11-101-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | param type 203a4aa31 Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_t (donaloconnor) Pull request description: CTxMemPoolEntry::CTxMemPoolEntry's modifySigOps parameter is int while update_ancestor_state::modifySigOpsCost is int64_t. This issue was raised in #11165. It looks like the function paramaters were not changed in commit 72abd2c This will avoid unexpected truncation of int64_t -> int Tree-SHA512: 314c703f217e104336456859066d18fb0d12c4f9f32835e17490a6f29eb05951184095039e4e57edacef8ad35dd75c6d97d9af656a52209dd0c3779b4ffa0914
| * Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_tdonaloconnor2017-09-071-1/+1
| |
* | Make float <-> int casts explicit outside of test, qt, CFeeRateMatt Corallo2017-09-111-1/+1
|/
* Merge #11164: Fix boost headers included as user instead of system headersWladimir J. van der Laan2017-09-051-4/+3
|\ | | | | | | | | | | | | | | | | | | | | 5ac072caa Fix boost headers included as user instead of system headers (Dan Raviv) Pull request description: In most of the project, boost headers are included as system headers. Fix the few inconsistent places where they aren't. Tree-SHA512: 280af33a7bdc9d68a15b729fa88e1e7627e20a054b8d52a12cc5350c1ac9e9c90fb09f0aa97a00960969f75bcf3403dc52b834c94448b814efa63bfaf3b82663
| * Fix boost headers included as user instead of system headersDan Raviv2017-08-261-4/+3
| | | | | | | | | | In most of the project, boost headers are included as system headers. Fix the few inconsistent places where they aren't.
* | Remove redundant explicitly defined copy ctorsDan Raviv2017-08-281-2/+0
|/ | | | | | | | | CFeeRate and CTxMemPoolEntry have explicitly defined copy ctors which has the same functionality as the implicit default copy ctors which would have been generated otherwise. Besides being redundant, it violates the rule of three (see https://en.wikipedia.org/wiki/Rule_of_three_(C%2B%2B_programming) ). (Of course, the rule of three doesn't -really- cause a resource management issue here, but the reason for that is exactly that there is no need for an explicit copy ctor in the first place since no resources are being managed). CFeeRate has an explicitly defined copy ctor which has the same functionality as the implicit default copy ctor which would h ave been generated otherwise.
* Declare single-argument (non-converting) constructors "explicit"practicalswift2017-08-161-3/+3
| | | | In order to avoid unintended implicit conversions.
* Merge #9964: Add const to methods that do not modify the object for which it ↵MarcoFalke2017-08-161-1/+1
|\ | | | | | | | | | | | | | | | | | | is called 6e8c48dc5 Add const to methods that do not modify the object for which it is called (practicalswift) Pull request description: Tree-SHA512: a6888111ba16fb796e320e60806e1a77d36f545989b5405dc7319992291800109eab0b8e8c286b784778f41f1ff5289e7cb6b4afd7aec77f385fbcafc02cffc1
| * Add const to methods that do not modify the object for which it is calledpracticalswift2017-07-251-1/+1
| |
* | scripted-diff: Use the C++11 keyword nullptr to denote the pointer literal ↵practicalswift2017-08-071-2/+2
|/ | | | | | | | | | | | | instead of the macro NULL -BEGIN VERIFY SCRIPT- sed -i 's/\<NULL\>/nullptr/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h src/qt/*/*.cpp src/qt/*/*.h src/wallet/*/*.cpp src/wallet/*/*.h src/support/allocators/*.h sed -i 's/Prefer nullptr, otherwise SAFECOOKIE./Prefer NULL, otherwise SAFECOOKIE./g' src/torcontrol.cpp sed -i 's/tor: Using nullptr authentication/tor: Using NULL authentication/g' src/torcontrol.cpp sed -i 's/METHODS=nullptr/METHODS=NULL/g' src/test/torcontrol_tests.cpp src/torcontrol.cpp sed -i 's/nullptr certificates/NULL certificates/g' src/qt/paymentserver.cpp sed -i 's/"nullptr"/"NULL"/g' src/torcontrol.cpp src/test/torcontrol_tests.cpp -END VERIFY SCRIPT-