Commit Graph

26 Commits

Author SHA1 Message Date
Pieter Wuille 386037615a Make sure the genesis block is present after reindex 2013-02-01 23:29:59 +01:00
Pieter Wuille f9cae832e6 Parallelize script verification
* During block verification (when parallelism is requested), script
  check actions are stored instead of being executed immediately.
* After every processed transactions, its signature actions are
  pushed to a CScriptCheckQueue, which maintains a queue and some
  synchronization mechanism.
* Two or more threads (if enabled) start processing elements from
  this queue,
* When the block connection code is finished processing transactions,
  it joins the worker pool until the queue is empty.

As cs_main is held the entire time, and all verification must be
finished before the block continues processing, this does not reach
the best possible performance. It is a less drastic change than
some more advanced mechanisms (like doing verification out-of-band
entirely, and rolling back blocks when a failure is detected).

The -par=N flag controls the number of threads (1-16). 0 means auto,
and is the default.
2013-01-08 02:00:59 +01:00
Pieter Wuille 487db8a2b1 Make test_bitcoin run in a temp datadir 2012-11-29 22:09:16 +01:00
Pieter Wuille c7075c4b65 Fix tests after cache tweaks 2012-11-10 00:09:57 +01:00
Pieter Wuille 7fea484674 Add -reindex, to perform in-place reindexing of block chain files
Flushes the blktree/ and coins/ databases, and reindexes the
block chain files, as if their contents was loaded via -loadblock.

Based on earlier work by Jeff Garzik.
2012-11-09 01:06:32 +01:00
Pieter Wuille 4ca60bba5c Remove BDB block database support 2012-10-20 23:08:57 +02:00
Pieter Wuille e1bfbab802 Add LevelDB MemEnv support
Support LevelDB memory-backed environments, and use them in unit tests.
2012-10-20 23:08:57 +02:00
Pieter Wuille d979e6e36a Use singleton block tree database instance 2012-10-20 23:08:57 +02:00
Gavin Andresen 4d51be1cf3 Suppress output when running unit tests.
This does two things:
1) Now does not output to debug.log if -printtodebugger flag is passed
2) Unit tests set -printtodebugger so only test results are output to stdout

Note that -printtodebugger only actually prints to the debugger on Windows.
2012-08-20 11:33:20 -04:00
Luke Dashjr 148e107da6 Run BDB disk-less for test_bitcoin 2012-07-11 04:26:44 +00:00
Wladimir J. van der Laan 641cfb1456 Fix build of testcases after commit 0f10b21719 2012-06-14 09:41:11 +02:00
Wladimir J. van der Laan 239c11d0dd Make testcases build, prevent windows symbol collision 2012-05-20 10:44:50 +02:00
Gavin Andresen 922e8e2929 Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16). 2012-01-13 10:22:23 -05:00
Gavin Andresen cc40ba2151 Global fixture to send output to console instead of debug.log 2011-12-19 12:40:19 -05:00
Gavin Andresen 1466b8b78a Rework unit tests so test_bitcoin.cpp does not #include them all 2011-12-19 12:39:47 -05:00
Gavin Andresen eb5fff9e16 Moved checkpoints out of main, to prep for using them to help prevent DoS attacks 2011-12-01 12:18:50 -05:00
Gavin Andresen b898c8fce6 Merge branch 'no-cryptopp' of https://github.com/tcatm/bitcoin 2011-10-05 10:38:10 -04:00
Wladimir J. van der Laan 2f7f2a5fca remove possibility of 63 bit overflow in ParseMoney
- also, add unit tests for various functions in util.cpp/util.h
2011-10-01 17:29:46 +02:00
Nils Schneider 6ccff2cbde remove cryptopp dependency, add simple unittest for SHA256Transform() 2011-09-30 20:00:22 +02:00
Pieter Wuille e93bf37e86 Test case for base64 encode/decode 2011-09-27 19:48:10 +02:00
Gavin Andresen 15f3ad4dbd Framework for banning mis-behaving peers 2011-09-21 12:49:53 -04:00
Matt Corallo 2c3691d53d Cleanup test suite output to be more useful. 2011-08-08 14:31:08 -04:00
Matt Corallo 3c8cecda1f Add file for transaction tests. 2011-08-08 14:31:08 -04:00
Vegard Nossum a8330e0049 Add a file for script tests 2011-08-08 14:31:08 -04:00
Vegard Nossum e707d29dd6 Fix testing setup
There were some problems with the existing testing setup:

 - Makefile rules for test-file compilation used CFLAGS instead of
   CXXFLAGS in makefile.unix
2011-08-08 14:31:08 -04:00
Gavin Andresen 8baf865c94 Boost unit-testing framework.
make -f makefile.{unix,osx,mingw} test_bitcoin
to compile dumb, do-almost-nothing placeholder unit tests.
2011-06-27 14:12:48 -04:00