aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
AgeCommit message (Collapse)Author
2019-05-03scripted-diff: replace chainActive -> ::ChainActive()James O'Beirne
Though at the moment ChainActive() simply references `g_chainstate.m_chain`, doing this change now clears the way for multiple chainstate usage and allows us to script the diff. -BEGIN VERIFY SCRIPT- git grep -l "chainActive" | grep -E '(h|cpp)$' | xargs sed -i '/chainActive =/b; /extern CChain& chainActive/b; s/\(::\)\{0,1\}chainActive/::ChainActive()/g' -END VERIFY SCRIPT-
2019-03-22Move g_is_mempool_loaded into CTxMemPool::m_is_loadedBen Woosley
So the loaded state is explicitly mempool-specific.
2019-02-25rpc: Pass mempool into MempoolToJSONMarcoFalke
2019-02-04remove deprecated mentions of signrawtransaction from fundraw helpGregory Sanders
2018-12-22validation: Add cs_main locking annotationsMarcoFalke
2018-12-20doc: Add comment to cs_main and mempool::csMarcoFalke
2018-11-05Extract CSipHasher to it's own file in crypto/ directory.Jim Posen
This is a move-only commit with the exception of changes to includes.
2018-09-26doxygen: Fix member commentsMarcoFalke
2018-09-07tx pool: Use class methods to hide raw map iterator impl detailsMarcoFalke
2018-08-29Merge #13792: tx pool: Avoid passing redundant hash into addUnchecked ↵Wladimir J. van der Laan
(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
2018-08-26Move cs_main locking annotations from .cpp to .hpracticalswift
2018-08-08Merge #13780: 0.17: Pre-branch maintenanceWladimir J. van der Laan
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
2018-07-30scripted-diff: Remove unused first argument to addUncheckedMarcoFalke
-BEGIN VERIFY SCRIPT- git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g' -END VERIFY SCRIPT-
2018-07-30Mark CTxMemPoolEntry members that should not be modified constMarcoFalke
2018-07-29refactor: Avoid locking tx pool cs thriceMarcoFalke
2018-07-27Return void instead of bool for functions that cannot failpracticalswift
* CBlockTreeDB::ReadReindexing(...) * CChainState::ResetBlockFailureFlags(...) * CTxMemPool::addUnchecked(...) * CWallet::LoadDestData(...) * CWallet::LoadKeyMetadata(...) * CWallet::LoadScriptMetadata(...) * CWallet::LoadToWallet(...) * CWallet::SetHDChain(...) * CWallet::SetHDSeed(...) * RemoveLocal(...) * SetMinVersion(...) * StartHTTPServer(...) * StartRPC(...) * TorControlConnection::Disconnect(...)
2018-07-27Update copyright headers to 2018DrahtBot
2018-07-24scripted-diff: Remove trailing whitespacesJoão Barbosa
-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-
2018-07-21Avoid locking mutexes that are already held by the same threadpracticalswift
2018-06-24doc: Clarify that mempool txiter is const_iteratorMarcoFalke
2018-06-11Remove deprecated TransactionWithinChainLimitKarl-Johan Alm
2018-06-11Add GetTransactionAncestry to CTxMemPool for general purpose chain limit ↵Karl-Johan Alm
checking
2018-06-11mempool: Fix max descendants checkKarl-Johan Alm
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.
2018-06-11mempool: Add explicit max_descendantsKarl-Johan Alm
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.
2018-05-05Add Clang thread safety analysis annotationspracticalswift
2018-05-05Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)practicalswift
* writing variable 'nCheckFrequency' requires holding mutex 'cs'
2018-05-05Add compile time checking for all ::mempool.cs runtime locking assertionspracticalswift
2018-04-02Merge #11742: rpc: Add testmempoolacceptWladimir J. van der Laan
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
2018-03-25Make CTxMemPool::isSpent() constRoman Zeyde
2018-03-24rpc: Add testmempoolacceptMarcoFalke
2018-03-21Fix typosDimitris Apostolou
2018-01-25Avoid leaking prioritization information when relaying transactionsSuhas Daftuar
2018-01-19Correct mempool mapTx commentSuhas Daftuar
2018-01-15Merge #12118: Sort mempool by min(feerate, ancestor_feerate)Wladimir J. van der Laan
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
2018-01-13Use mempool's ancestor sort in transaction selectionSuhas Daftuar
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.
2018-01-09Sort mempool by min(feerate, ancestor_feerate)Suhas Daftuar
This more closely approximates the desirability of a given transaction for mining.
2018-01-09Refactor CompareTxMemPoolEntryByDescendantScoreSuhas Daftuar
2018-01-09Remove unused mempool indexSuhas Daftuar
2018-01-03Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa
2017-12-07Make boost::multi_index comparators constSuhas Daftuar
This fixes compatibility with boost 1.66
2017-11-16scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider
-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-
2017-11-15Merge #10286: Call wallet notify callbacks in scheduler thread (without cs_main)Wladimir J. van der Laan
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
2017-11-10Merge #11269: [Mempool] CTxMemPoolEntry::UpdateAncestorState: modifySiagOps ↵MarcoFalke
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
2017-10-13Add a CValidationInterface::TransactionRemovedFromMempoolMatt Corallo
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()
2017-09-11Make float <-> int casts explicit outside of test, qt, CFeeRateMatt Corallo
2017-09-07Fix CTxMemPoolEntry::UpdateAncestorState: modifySigOps param type int -> int64_tdonaloconnor
2017-09-05Merge #11164: Fix boost headers included as user instead of system headersWladimir J. van der Laan
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
2017-08-28Remove redundant explicitly defined copy ctorsDan Raviv
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.
2017-08-26Fix boost headers included as user instead of system headersDan Raviv
In most of the project, boost headers are included as system headers. Fix the few inconsistent places where they aren't.
2017-08-16Declare single-argument (non-converting) constructors "explicit"practicalswift
In order to avoid unintended implicit conversions.