practicalswift
9a841696c1
tests: Reduce compilation time and unneccessary recompiles by removing unused includes in tests
2019-06-26 20:37:48 +02:00
MarcoFalke
faf400077d
scripted-diff: Bump copyright headers in test, bench
...
-BEGIN VERIFY SCRIPT-
./contrib/devtools/copyright_header.py update ./src/bench/
./contrib/devtools/copyright_header.py update ./src/test/
-END VERIFY SCRIPT-
2019-04-11 13:34:43 -04:00
MarcoFalke
fa821904bf
scripted-diff: Rename test_bitcoin to test/setup_common
...
-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-
2019-04-11 10:12:36 -04:00
MarcoFalke
fafe941bdd
test: Add missing validation locks
2018-12-17 14:27:29 -05:00
lucash-dev
ed61abedb2
Removed implicit CTransaction constructor from tests
2018-12-11 19:43:35 -08:00
Jim Posen
2068f089c8
scripted-diff: Move util files to separate directory.
...
-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-
2018-11-04 22:46:07 -08:00
Wladimir J. van der Laan
888acefa5e
Merge #13792 : tx pool: Avoid passing redundant hash into addUnchecked (scripted-diff)
...
fa587773e5
scripted-diff: Remove unused first argument to addUnchecked (MarcoFalke)
fe5c49766c
tx pool: Use the entry's hash instead of the one passed to addUnchecked (MarcoFalke)
ddd395f968
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 f77654a0e9
Passing in the hash is now redundant and the argument can safely be removed.
Tree-SHA512: 0206b65c7a014295f67574120e8c5397bf1b1bd70c918ae1360ab093676f7f89a6f084fd2c7000a141baebfe63fe6f515559e38c4ac71810ba64f949f9c0467f
2018-08-29 16:30:58 +02:00
Wladimir J. van der Laan
78dae8cacc
Merge #13780 : 0.17: Pre-branch maintenance
...
3fc20632a3
qt: Set BLOCK_CHAIN_SIZE = 220 (DrahtBot)
2b6a2f4a28
Regenerate manpages (DrahtBot)
eb7daf4d60
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-08-08 13:55:27 +02:00
MarcoFalke
fa587773e5
scripted-diff: Remove unused first argument to addUnchecked
...
-BEGIN VERIFY SCRIPT-
git grep -l addUnchecked | xargs sed --regexp-extended -i -e 's/addUnchecked\([^)][^,]+,\s*/addUnchecked(/g'
-END VERIFY SCRIPT-
2018-07-30 09:09:32 -04:00
MarcoFalke
fa5ed4f8d2
refactor: Avoid locking tx pool cs thrice
2018-07-29 08:04:06 -04:00
DrahtBot
eb7daf4d60
Update copyright headers to 2018
2018-07-27 07:15:02 -04:00
João Barbosa
12dd101345
scripted-diff: Remove trailing whitespaces
...
-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-24 20:46:23 +01:00
MarcoFalke
faf52f953b
tests: Drop variadic macro
2018-06-13 09:58:54 -04:00
Karl-Johan Alm
f77e1d34fd
test: Add MempoolAncestryTests
2018-06-11 19:09:44 +09:00
practicalswift
47782b49e6
Add Clang thread safety analysis annotations
2018-05-05 16:51:22 +02:00
practicalswift
c3f34d06be
Make it clear which functions that are intended to be translation unit local
...
Do not share functions that are meant to be translation unit local with
other translation units. Use internal linkage for those consistently.
2018-05-03 21:47:40 +02:00
Karl-Johan Alm
c55aa4f27d
test: Fix sign for expected values
...
A number of BOOST_CHECK_EQUAL calls would result in warnings about signs.
2018-04-11 13:39:41 +09:00
Dimitris Apostolou
4d9b4256d8
Fix typos
2018-03-21 08:34:44 +02:00
Wladimir J. van der Laan
44080a90a2
Merge #12118 : Sort mempool by min(feerate, ancestor_feerate)
...
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-15 15:36:35 +01:00
Suhas Daftuar
7abfa538b5
Add test for new ancestor feerate sort behavior
2018-01-12 12:40:55 -05:00
Suhas Daftuar
8e617e3708
Remove unused mempool index
2018-01-09 08:59:21 -05:00
Akira Takizawa
595a7bab23
Increment MIT Licence copyright header year on files modified in 2017
2018-01-03 02:26:56 +09:00
MeshCollider
1a445343f6
scripted-diff: Replace #include "" with #include <> (ryanofsky)
...
-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-16 08:23:01 +13:00
practicalswift
109a858995
tests: Add missing locks to tests
...
Add missing locks to tests to satisfy lock requirements (such as
EXCLUSIVE_LOCKS_REQUIRED(...) (Clang Thread Safety Analysis),
AssertLockHeld(...) and implicit lock assumptions).
2017-11-10 17:16:07 +01:00
Matt Corallo
1789e4675b
Force explicit double -> int conversion for CFeeRate constructor
...
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.
2017-09-11 18:07:52 -04:00
Wladimir J. van der Laan
47510ad3dd
Merge #9548 : Remove min reasonable fee
...
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
2017-03-07 19:49:00 +01:00
Alex Morcos
359e8a03d1
[cleanup] Remove coin age priority completely.
...
Remove GetPriority and ComputePriority. Remove internal machinery for tracking priority in CTxMemPoolEntry.
2017-03-03 16:50:20 -05:00
Alex Morcos
0315888d0d
[test] Remove priority from tests
...
Remove all coin age priority functionality from unit tests and RPC tests.
2017-03-03 16:50:19 -05:00
Alex Morcos
ad82cb06ce
Remove unnecessary min fee argument in CTxMemPool constructor
2017-01-17 13:21:35 -05:00
Alex Morcos
84f7ab08d2
Remove member variable hadNoDependencies from CTxMemPoolEntry
...
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-04 12:09:33 -05:00
isle2983
27765b6403
Increment MIT Licence copyright header year on files modified in 2016
...
Edited via:
$ contrib/devtools/copyright_header.py update .
2016-12-31 11:01:21 -07:00
Wladimir J. van der Laan
1eef038b1b
Merge #7562 : Bump transaction version default to 2
...
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)
2016-12-15 17:03:31 +01:00
Alex Morcos
c5d746ace7
tiny test fix for mempool_tests
2016-12-08 20:11:39 +00:00
Alex Morcos
a874ab5ccf
remove internal tracking of mempool conflicts for reporting to wallet
2016-12-05 13:41:25 -05:00
Alex Morcos
bf663f8e93
remove external usage of mempool conflict tracking
2016-12-05 13:41:25 -05:00
Pieter Wuille
b4e4ba475a
Introduce convenience type CTransactionRef
2016-11-19 17:53:23 -08:00
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
2016-11-19 17:51:09 -08:00
Daniel Kraft
f91afe9aac
trivial: Remove variable unused after refactoring
...
Remove a variable that is now unused after the recent refactoring
(in 51f278329d
) but has not been cleaned
up so far.
2016-11-02 19:31:19 +01:00
Pieter Wuille
4100499db4
Return shared_ptr<CTransaction> from mempool removes
2016-10-21 19:22:43 -07:00
Pieter Wuille
51f278329d
Make removed and conflicted arguments optional to remove
2016-10-21 19:22:43 -07:00
Pieter Wuille
2b1f6f9ccf
BIP141: Other consensus critical limits, and BIP145
...
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Suhas Daftuar
e2eeb5dda7
Add ancestor feerate index to mempool
2016-03-14 12:13:34 -04:00
Suhas Daftuar
5de2baa138
Rename CTxMemPool::remove -> removeRecursive
...
remove is no longer called non-recursively, so simplify the logic
and eliminate an unnecessary parameter
2016-03-14 12:11:09 -04:00
Suhas Daftuar
086da92ea7
Add tags to mempool's mapTx indices
2016-02-16 12:35:16 -05:00
MarcoFalke
fa24439ff3
Bump copyright headers to 2015
2015-12-13 18:08:39 +01:00
Alex Morcos
f3fe83673e
Add a score index to the mempool.
...
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.
2015-12-01 10:10:25 -05:00
Alex Morcos
e587bc3fd9
Implement helper class for CTxMemPoolEntry constructor
...
This is only for unit tests.
2015-11-16 20:41:32 -05:00
Alex Morcos
a78e6eaf5c
Fix bug in mempool_tests unit test
2015-11-13 10:50:49 -05:00
Matt Corallo
8abe0f5658
Undo GetMinFee-requires-extra-call-to-hit-0
2015-10-14 12:44:18 -07:00
Matt Corallo
074cb155c2
Add reasonable test case for mempool trimming
2015-10-13 01:39:38 -07:00