aboutsummaryrefslogtreecommitdiff
path: root/src/test/mempool_tests.cpp
Commit message (Collapse)AuthorAgeFilesLines
* scripted-diff: test: Move setup_common to test libraryMarcoFalke2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- # Move files for f in $(git ls-files src/test/lib/); do git mv $f src/test/util/; done git mv src/test/setup_common.cpp src/test/util/ git mv src/test/setup_common.h src/test/util/ # Replace Windows paths sed -i -e 's|\\setup_common|\\util\\setup_common|g' $(git grep -l '\\setup_common') sed -i -e 's|src\\test\\lib\\|src\\test\\util\\|g' build_msvc/test_bitcoin/test_bitcoin.vcxproj # Everything else sed -i -e 's|/setup_common|/util/setup_common|g' $(git grep -l 'setup_common') sed -i -e 's|test/lib/|test/util/|g' $(git grep -l 'test/lib/') # Fix include guard sed -i -e 's|BITCOIN_TEST_SETUP_COMMON_H|BITCOIN_TEST_UTIL_SETUP_COMMON_H|g' ./src/test/util/setup_common.h sed -i -e 's|BITCOIN_TEST_LIB_|BITCOIN_TEST_UTIL_|g' $(git grep -l 'BITCOIN_TEST_LIB_') -END VERIFY SCRIPT-
* test: add "diamond" unit test to MempoolAncestryTestsSebastian Falbesoner2019-11-041-0/+37
| | | | | | Approaches #17271. If ancestors are represented more than once, check that those are not overcounted.
* txmempool: Remove unused default value MemPoolRemovalReason::UNKNOWNMarcoFalke2019-07-221-10/+12
|
* tests: Reduce compilation time and unneccessary recompiles by removing ↵practicalswift2019-06-261-1/+1
| | | | unused includes in tests
* scripted-diff: Bump copyright headers in test, benchMarcoFalke2019-04-111-1/+1
| | | | | | | -BEGIN VERIFY SCRIPT- ./contrib/devtools/copyright_header.py update ./src/bench/ ./contrib/devtools/copyright_header.py update ./src/test/ -END VERIFY SCRIPT-
* scripted-diff: Rename test_bitcoin to test/setup_commonMarcoFalke2019-04-111-1/+1
| | | | | | | | | -BEGIN VERIFY SCRIPT- sed -i --regexp-extended -e 's/test_bitcoin\.(h|cpp)/setup_common.\1/g' $(git grep -l test_bitcoin) git mv ./src/test/test_bitcoin.h ./src/test/setup_common.h git mv ./src/test/test_bitcoin.cpp ./src/test/setup_common.cpp sed -i -e 's/BITCOIN_TEST_TEST_BITCOIN_H/BITCOIN_TEST_SETUP_COMMON_H/g' ./src/test/setup_common.h -END VERIFY SCRIPT-
* test: Add missing validation locksMarcoFalke2018-12-171-5/+5
|
* Removed implicit CTransaction constructor from testslucash-dev2018-12-111-12/+12
|
* scripted-diff: Move util files to separate directory.Jim Posen2018-11-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -BEGIN VERIFY SCRIPT- mkdir -p src/util git mv src/util.h src/util/system.h git mv src/util.cpp src/util/system.cpp git mv src/utilmemory.h src/util/memory.h git mv src/utilmoneystr.h src/util/moneystr.h git mv src/utilmoneystr.cpp src/util/moneystr.cpp git mv src/utilstrencodings.h src/util/strencodings.h git mv src/utilstrencodings.cpp src/util/strencodings.cpp git mv src/utiltime.h src/util/time.h git mv src/utiltime.cpp src/util/time.cpp sed -i 's/<util\.h>/<util\/system\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmemory\.h>/<util\/memory\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilmoneystr\.h>/<util\/moneystr\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utilstrencodings\.h>/<util\/strencodings\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/<utiltime\.h>/<util\/time\.h>/g' $(git ls-files 'src/*.h' 'src/*.cpp') sed -i 's/BITCOIN_UTIL_H/BITCOIN_UTIL_SYSTEM_H/g' src/util/system.h sed -i 's/BITCOIN_UTILMEMORY_H/BITCOIN_UTIL_MEMORY_H/g' src/util/memory.h sed -i 's/BITCOIN_UTILMONEYSTR_H/BITCOIN_UTIL_MONEYSTR_H/g' src/util/moneystr.h sed -i 's/BITCOIN_UTILSTRENCODINGS_H/BITCOIN_UTIL_STRENCODINGS_H/g' src/util/strencodings.h sed -i 's/BITCOIN_UTILTIME_H/BITCOIN_UTIL_TIME_H/g' src/util/time.h sed -i 's/ util\.\(h\|cpp\)/ util\/system\.\1/g' src/Makefile.am sed -i 's/utilmemory\.\(h\|cpp\)/util\/memory\.\1/g' src/Makefile.am sed -i 's/utilmoneystr\.\(h\|cpp\)/util\/moneystr\.\1/g' src/Makefile.am sed -i 's/utilstrencodings\.\(h\|cpp\)/util\/strencodings\.\1/g' src/Makefile.am sed -i 's/utiltime\.\(h\|cpp\)/util\/time\.\1/g' src/Makefile.am sed -i 's/-> util ->/-> util\/system ->/' test/lint/lint-circular-dependencies.sh sed -i 's/src\/util\.cpp/src\/util\/system\.cpp/g' test/lint/lint-format-strings.py test/lint/lint-locale-dependence.sh sed -i 's/src\/utilmoneystr\.cpp/src\/util\/moneystr\.cpp/g' test/lint/lint-locale-dependence.sh sed -i 's/src\/utilstrencodings\.\(h\|cpp\)/src\/util\/strencodings\.\1/g' test/lint/lint-locale-dependence.sh sed -i 's/src\\utilstrencodings\.cpp/src\\util\\strencodings\.cpp/' build_msvc/libbitcoinconsensus/libbitcoinconsensus.vcxproj -END VERIFY SCRIPT-
* Merge #13792: tx pool: Avoid passing redundant hash into addUnchecked ↵Wladimir J. van der Laan2018-08-291-42/+42
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-42/+42
| | | | | | | | | | | | -BEGIN VERIFY SCRIPT- git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g' -END VERIFY SCRIPT-
* | 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-2/+5
|/
* 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-
* tests: Drop variadic macroMarcoFalke2018-06-131-9/+6
|
* test: Add MempoolAncestryTestsKarl-Johan Alm2018-06-111-0/+178
|
* Add Clang thread safety analysis annotationspracticalswift2018-05-051-1/+1
|
* Make it clear which functions that are intended to be translation unit localpracticalswift2018-05-031-1/+1
| | | | | Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently.
* test: Fix sign for expected valuesKarl-Johan Alm2018-04-111-10/+10
| | | | A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
* Fix typosDimitris Apostolou2018-03-211-1/+1
|
* Merge #12118: Sort mempool by min(feerate, ancestor_feerate)Wladimir J. van der Laan2018-01-151-0/+17
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| * Add test for new ancestor feerate sort behaviorSuhas Daftuar2018-01-121-0/+17
| |
* | Remove unused mempool indexSuhas Daftuar2018-01-091-29/+0
|/
* Increment MIT Licence copyright header year on files modified in 2017Akira Takizawa2018-01-031-1/+1
|
* scripted-diff: Replace #include "" with #include <> (ryanofsky)MeshCollider2017-11-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -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-
* tests: Add missing locks to testspracticalswift2017-11-101-0/+2
| | | | | | Add missing locks to tests to satisfy lock requirements (such as EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis), AssertLockHeld(...) and implicit lock assumptions).
* Force explicit double -> int conversion for CFeeRate constructorMatt Corallo2017-09-111-3/+3
| | | | | | | This resolves an issue where estimatesmartfee would return 999 sat/byte instead of 1000, due to floating point loss of precision Thanks to sipa for suggesting is_integral.
* Merge #9548: Remove min reasonable feeWladimir J. van der Laan2017-03-071-4/+4
|\ | | | | | | | | | | | | | | 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-4/+4
| |
* | [cleanup] Remove coin age priority completely.Alex Morcos2017-03-031-1/+0
| | | | | | | | Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
* | [test] Remove priority from testsAlex Morcos2017-03-031-22/+20
|/ | | | Remove all coin age priority functionality from unit tests and RPC tests.
* Remove member variable hadNoDependencies from CTxMemPoolEntryAlex Morcos2017-01-041-2/+0
| | | | 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.
* Increment MIT Licence copyright header year on files modified in 2016isle29832016-12-311-1/+1
| | | | | | Edited via: $ contrib/devtools/copyright_header.py update .
* Merge #7562: Bump transaction version default to 2Wladimir J. van der Laan2016-12-151-2/+11
|\ | | | | | | | | | | | | c5c92c4 Update python tests for default tx version=2 (BtcDrak) dab207e Preserve tx version=1 for certain tests (BtcDrak) c5d746a tiny test fix for mempool_tests (Alex Morcos) 1f0ca1a Bump default transaction version to 2 (BtcDrak)
| * tiny test fix for mempool_testsAlex Morcos2016-12-081-2/+11
| |
* | remove internal tracking of mempool conflicts for reporting to walletAlex Morcos2016-12-051-19/+21
| |
* | remove external usage of mempool conflict trackingAlex Morcos2016-12-051-1/+1
|/
* Introduce convenience type CTransactionRefPieter Wuille2016-11-191-4/+4
|
* Make CBlock::vtx a vector of shared_ptr<CTransaction>Pieter Wuille2016-11-191-3/+3
|
* trivial: Remove variable unused after refactoringDaniel Kraft2016-11-021-1/+0
| | | | | | Remove a variable that is now unused after the recent refactoring (in 51f278329d43398428d60f5986f8d29a2041d28d) but has not been cleaned up so far.
* Return shared_ptr<CTransaction> from mempool removesPieter Wuille2016-10-211-1/+2
|
* Make removed and conflicted arguments optional to removePieter Wuille2016-10-211-15/+12
|
* BIP141: Other consensus critical limits, and BIP145Pieter Wuille2016-06-221-5/+6
| | | | Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
* Add ancestor feerate index to mempoolSuhas Daftuar2016-03-141-0/+104
|
* Rename CTxMemPool::remove -> removeRecursiveSuhas Daftuar2016-03-141-10/+10
| | | | | remove is no longer called non-recursively, so simplify the logic and eliminate an unnecessary parameter
* Add tags to mempool's mapTx indicesSuhas Daftuar2016-02-161-11/+11
|
* Bump copyright headers to 2015MarcoFalke2015-12-131-1/+1
|
* Add a score index to the mempool.Alex Morcos2015-12-011-9/+43
| | | | The score index is meant to represent the order of priority for being included in a block for miners. Initially this is set to the transactions modified (by any feeDelta) fee rate. Index improvements and unit tests by sdaftuar.
* Implement helper class for CTxMemPoolEntry constructorAlex Morcos2015-11-161-32/+37
| | | | This is only for unit tests.