aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #2849 from petertodd/if-else-elseGavin Andresen2013-08-052-1/+30
|\ | | | | Add unittests for multiple ELSEs in a row
| * Add unittests for multiple ELSEs in a rowPeter Todd2013-07-232-1/+30
| | | | | | | | | | IF ELSE ELSE ENDIF is a valid construct; execution or non-execution inverts on each ELSE encountered.
* | Move internal miner/block creation to separate miner.cpp module.Jeff Garzik2013-07-311-0/+1
|/ | | | Public functions referenced elsewhere are added to miner.h.
* Merge pull request #2743 from jgarzik/reject-reasonJeff Garzik2013-07-102-7/+10
|\ | | | | Log reason for non-standard transaction rejection
| * Log reason for non-standard transaction rejectionJeff Garzik2013-06-232-7/+10
| |
* | Make the rand tests determinstic. (fixes #2714)Gregory Maxwell2013-07-071-33/+1
| | | | | | | | | | | | This avoids spurious errors with the old tests but still tests enough that if the rng is replaced with a totally broken one it should still fail.
* | Pulled CheckBlock out of CBlock.Eric Lombrozo2013-06-231-1/+1
|/
* Introduce a CChainParameters singleton class and regtest mode.Mike Hearn2013-06-192-12/+12
| | | | | | | | | | | | | The new class is accessed via the Params() method and holds most things that vary between main, test and regtest networks. The regtest mode has two purposes, one is to run the bitcoind/bitcoinj comparison tool which compares two separate implementations of the Bitcoin protocol looking for divergence. The other is that when run, you get a local node which can mine a single block instantly, which is highly convenient for testing apps during development as there's no need to wait 10 minutes for a block on the testnet.
* Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo2013-06-054-23/+23
| | | | | | | | | | | | | | | | | the mempool instance. Removed AreInputsStandard from CTransaction, made it a regular function in main. Moved CTransaction::GetOutputFor to CCoinsViewCache. Moved GetLegacySigOpCount and GetP2SHSigOpCount out of CTransaction into regular functions in main. Moved GetValueIn and HaveInputs from CTransaction into CCoinsViewCache. Moved AllowFree, ClientCheckInputs, CheckInputs, UpdateCoins, and CheckTransaction out of CTransaction and into main. Moved IsStandard and IsFinal out of CTransaction and put them in main as IsStandardTx and IsFinalTx. Moved GetValueOut out of CTransaction into main. Moved CTxIn, CTxOut, and CTransaction into core. Added minimum fee parameter to CTxOut::IsDust() temporarily until CTransaction is moved to core.h so that CTxOut needn't know about CTransaction.
* Merge pull request #2727 from TheBlueMatt/masterWladimir J. van der Laan2013-06-031-1/+7
|\ | | | | One more data-driven test-case
| * Add new data-driven test-case.Matt Corallo2013-06-021-1/+7
| |
* | remove GetBoolArg() fDefault parameter defaulting to falsePhilip Kaufmann2013-06-012-32/+18
| | | | | | | | | | | | | | | | - explicitly set the default of all GetBoolArg() calls - rework getarg_test.cpp and util_tests.cpp to cover this change - some indentation fixes - move macdockiconhandler.h include in bitcoin.cpp to the "our headers" section
* | Merge pull request #2600 from sipa/keyrefactorJeff Garzik2013-05-307-74/+71
|\ \ | | | | | | Refactor key.cpp/.h
| * | CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille2013-05-307-74/+71
| |/
* | Merge pull request #2104 from al42and/listreceivedbyaddress_txidsJeff Garzik2013-05-301-7/+28
|\ \ | | | | | | listreceivedbyaddress now provides tx ids (issue #1149)
| * | Updated help and tests for getreceivedby(account|address)Andrey2012-12-161-7/+28
| | |
* | | Merge pull request #2657 from gmaxwell/its_after_may15_foreverJeff Garzik2013-05-301-2/+0
|\ \ \ | |_|/ |/| | It's after 2013-05-15 forever now, so remove the code for the May 15 fork
| * | It's after 2013-05-15 forever now, so remove the code for the May 15 fork.Gregory Maxwell2013-05-161-2/+0
| | |
* | | Add a few data-driven tests for SIGHASH_ANYONECANPAYMatt Corallo2013-05-212-2/+17
|/ /
* | Define dust transaction outputs, and make them non-standardGavin Andresen2013-05-033-22/+34
| |
* | Remove flaky util thread unit testsGavin Andresen2013-05-031-58/+0
| |
* | Port Thread* methods to boost::thread_groupGavin Andresen2013-04-031-2/+4
| |
* | LoopForever and ThreadTrace helpersGavin Andresen2013-04-031-0/+58
| |
* | Fix signed/unsigned comparison warningsGavin Andresen2013-04-036-44/+44
| |
* | -alertnotify=<cmd>Gavin Andresen2013-03-192-29/+82
| | | | | | | | | | | | Runs a shell command when an AppliesToMe() alert is received. %s in the <cmd> string is replaced with the alert.strStatusBar message.
* | Some unit tests for CAlertGavin Andresen2013-03-192-0/+132
| |
* | Update unit test to match rule enforcement starts 21 MarchGavin Andresen2013-03-171-1/+1
| |
* | CheckBlock rule until 15-May for 10,000 BDB lock compatibilityGavin Andresen2013-03-171-0/+66
| |
* | Test canonical prunable txout format explicitlyPeter Todd2013-03-012-0/+5
| |
* | Add coverage for all invalid opsPeter Todd2013-03-012-1/+131
| | | | | | | | 0xba thru 0xff
* | Internal RNG for approximateBestSubset to prevent degenerate behavior.Gregory Maxwell2013-02-181-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes test_bitcoin failures on openbsd reported by dhill on IRC. On some systems rand() is a simple LCG over 2^31 and so it produces an even-odd sequence. ApproximateBestSubset was only using the least significant bit and so every run of the iterative solver would be the same for some inputs, resulting in some pretty dumb decisions. Using something other than the least significant bit would paper over the issue but who knows what other way a system's rand() might get us here. Instead we use an internal RNG with a period of something like 2^60 which is well behaved. This also makes it possible to make the selection deterministic for the tests, if we wanted to implement that.
* | Make sure the genesis block is present after reindexPieter Wuille2013-02-011-1/+1
| |
* | CValidationState frameworkPieter Wuille2013-01-302-5/+11
| |
* | Merge pull request #2060 from sipa/parallelGavin Andresen2013-01-171-0/+4
|\ \ | | | | | | Parallel script verification
| * | Parallelize script verificationPieter Wuille2013-01-081-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* | | Add nFlags to CBloomFilter to make filter updating optional.Matt Corallo2013-01-161-22/+118
| | |
* | | Use CPartialMerkleTree for CMerkleBlock transactions.Matt Corallo2013-01-161-57/+78
| | |
* | | Add CPartialMerkleTreePieter Wuille2013-01-161-0/+98
| | | | | | | | | | | | | | | This adds a compact representation for a subset of a merkle tree's nodes.
* | | Add a nTweak to bloom filters to tweak the seed.Matt Corallo2013-01-161-20/+48
| | |
* | | Add test cases for CMerkleBlock and CBloomFilter.Matt Corallo2013-01-161-0/+302
| | |
* | | Merge pull request #2115 from forrestv/getblocktemplate_allfeesPieter Wuille2013-01-101-22/+23
|\ \ \ | |/ / |/| | Provide fee data for all txs in RPC getblocktemplate response
| * | changed CreateNewBlock to return a CBlockTemplate object, which includes ↵Forrest Voight2012-12-191-22/+23
| | | | | | | | | | | | per-tx fee and sigop count data
* | | test/util_tests.cpp: one more DateTimeStrFormat 'T' removalJeff Garzik2013-01-011-4/+4
|/ /
* | Merge pull request #2096 from 94m3k1n9/fix-time-formatsPieter Wuille2012-12-131-4/+4
|\ \ | |/ |/| Change timestamps to use ISO8601 formatting
| * Change timestamps to use ISO8601 formattingRichard Schwab2012-12-121-4/+4
| |
* | Merge pull request #1825 from roques/bignum2Gavin Andresen2012-12-121-0/+53
|\ \ | |/ |/| Bignum2
| * tests for SetCompact and GetCompact of CBigNumChristian von Roques2012-09-151-0/+53
| |
* | Make test_bitcoin run in a temp datadirPieter Wuille2012-11-291-0/+7
| |
* | Introduce script verification flagsPieter Wuille2012-11-155-39/+38
| | | | | | | | | | | | | | | | These flags select features to be enabled/disabled during script evaluation/checking, instead of several booleans passed along. Currently these flags are defined: * SCRIPT_VERIFY_P2SH: enable BIP16-style subscript evaluation * SCRIPT_VERIFY_STRICTENC: enforce strict adherence to pubkey/sig encoding standards.
* | Fix tests after cache tweaksPieter Wuille2012-11-101-2/+2
| |