MarcoFalke
fae58eca93
tests: Avoid copies of CTransaction
2018-04-11 14:59:53 -04:00
Luke Dashjr
a5bca13095
Bugfix: Include <memory> for std::unique_ptr
2018-04-02 18:31:52 +00: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
d223bc940a
Use unique_ptr for pcoinscatcher/pcoinsdbview/pcoinsTip/pblocktree
...
* pcoinscatcher (CCoinsViewErrorCatcher)
* pcoinsdbview (CCoinsViewDB)
* pcoinsTip (CCoinsViewCache)
* pblocktree (CBlockTreeDB)
* Remove variables shadowing pcoinsdbview
2017-11-09 16:53:34 +01:00
João Barbosa
83df25736e
Add CConnmanTest to mutate g_connman in tests
2017-11-02 12:39:14 -04:00
James O'Beirne
46ce223d15
Add tests for CMerkleBlock usage with txids specified
2017-09-20 20:36:10 -07:00
Cory Fields
8ad663c1fa
net: use an interface class rather than signals for message processing
...
Drop boost signals in favor of a stateful class. This will allow the message
processing loop to actually move to net_processing in a future step.
2017-09-06 19:32:04 -04:00
practicalswift
64fb0ac016
Declare single-argument (non-converting) constructors "explicit"
...
In order to avoid unintended implicit conversions.
2017-08-16 16:33:25 +02:00
Matt Corallo
cda1429d5b
Give CMainSignals a reference to the global scheduler
...
...so that it can run some signals in the background later
2017-07-07 11:33:18 -04:00
practicalswift
30c2d9db48
[tests] Remove unused function InsecureRandBytes(size_t len)
2017-06-08 09:43:54 +02:00
Pieter Wuille
e945848582
scripted-diff: Use new naming style for insecure_rand* functions
...
-BEGIN VERIFY SCRIPT-
sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp
-END VERIFY SCRIPT-
2017-06-07 12:08:39 -07:00
Pieter Wuille
1119927df0
Add various insecure_rand wrappers for tests
2017-06-05 12:44:44 -07:00
Pieter Wuille
124d13a58c
Merge test_random.h into test_bitcoin.h
2017-06-05 12:44:44 -07:00
Wladimir J. van der Laan
bac5c9cf64
Replace uses of boost::filesystem with fs
...
Step two in abstracting away boost::filesystem.
To repeat this, simply run:
```
git ls-files \*.cpp \*.h | xargs sed -i 's/boost::filesystem/fs/g'
```
2017-04-03 12:32:32 +02:00
Wladimir J. van der Laan
7d5172d354
Replace includes of boost/filesystem.h with fs.h
...
This is step one in abstracting the use of boost::filesystem.
2017-04-03 12:32:32 +02: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
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
Pieter Wuille
1662b437b3
Make CBlock::vtx a vector of shared_ptr<CTransaction>
2016-11-19 17:51:09 -08:00
Cory Fields
cd16f48028
net: Create CConnman to encapsulate p2p connections
2016-09-08 12:04:35 -04: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
Matt Corallo
f4f8f14adc
Add TestMemPoolEntryHelper::FromTx version for CTransaction
2016-06-19 01:34:57 -07:00
Wladimir J. van der Laan
f4eae2d910
test: Create test fixture for wallet
...
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by
making the wallet tests use their own fixture.
2016-04-18 14:57:42 +02:00
Alex Morcos
982670c333
Add LockPoints
...
Obtain LockPoints to store in CTxMemPoolEntry and during a reorg, evaluate whether they are still valid and if not, recalculate them.
2016-03-16 16:11:46 -04:00
MarcoFalke
fa60d05a4e
Add missing copyright headers
2016-01-05 21:34:15 +01:00
Alex Morcos
c49d5bc9e6
Store the total sig op count of a tx.
...
Store sum of legacy and P2SH sig op counts. This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-12-01 10:10:25 -05:00
Suhas Daftuar
7e49f5f8b4
Track coinbase spends in CTxMemPoolEntry
...
This allows us to optimize CTxMemPool::removeForReorg.
2015-11-30 13:12:53 -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
Pieter Wuille
6e18268616
Switch to libsecp256k1-based validation for ECDSA
2015-11-15 16:06:57 +01:00
Jorge Timón
f3525e24e3
Chainparams: Replace CBaseChainParams::Network enum with string constants (suggested by Wladimir)
2015-10-20 14:22:44 +02:00
Gavin Andresen
517e6dd256
Unit test doublespends in new blocks
...
As suggested by Greg Maxwell-- unit test to make sure a block
with a double-spend in it doesn't pass validation if half of
the double-spend is already in the memory pool (so full-blown
transaction validation is skipped) when the block is received.
2015-07-27 15:50:21 +02:00
Wladimir J. van der Laan
92fd887fd4
tests: add a BasicTestingSetup and apply to all tests
...
Make sure that chainparams and logging is properly initialized. Doing
this for every test may be overkill, but this initialization is so
simple that that does not matter.
This should fix the travis issues.
2015-03-12 09:45:22 +01:00
Pieter Wuille
51598b2631
Reinitialize state in between individual unit tests.
...
This changes the TestingSetup fixture to be per-unit-test rather than global.
Most tests don't need it, so it's only invoked in a few.
2015-03-03 09:01:46 -08:00