aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2013-08-20Add MurmurHash3() unit testPeter Todd
Useful as a source of test vectors to anyone re-implementing bloom filters.
2013-08-15Merge pull request #2880 from gavinandresen/test_numequalGavin Andresen
More unit tests for OP_NUMEQUAL
2013-08-15Merge pull request #2886 from gavinandresen/rpctimingGavin Andresen
Make RPC password resistant to timing attacks
2013-08-15Merge pull request #2131 from sipa/evensGregory Maxwell
Only create signatures with even S, and verification mode to check.
2013-08-15Merge pull request #2829 from sipa/bip32Gavin Andresen
BIP 32 derivation + test vectors
2013-08-16Only create signatures with even S, and verification mode to check.Pieter Wuille
To fix a minor malleability found by Sergio Lerner (reported here: https://bitcointalk.org/index.php?topic=8392.msg1245898#msg1245898) The problem is that if (R,S) is a valid ECDSA signature for a given message and public key, (R,-S) is also valid. Modulo N (the order of the secp256k1 curve), this means that both (R,S) and (R,N-S) are valid. Given that N is odd, S and N-S have a different lowest bit. We solve the problem by forcing signatures to have an even S value, excluding one of the alternatives. This commit just changes the signing code to always produce even S values, and adds a verification mode to check it. This code is not enabled anywhere yet. Existing tests in key_tests.cpp verify that the produced signatures are still valid.
2013-08-08Make RPC password resistant to timing attacksGavin Andresen
Fixes issue#2838; this is a tweaked version of pull#2845 that should not leak the length of the password and is more generic, in case we run into other situations where we need timing-attack-resistant comparisons.
2013-08-06Merge pull request #2871 from gavinandresen/simplify_maporphanGavin Andresen
Simplify storage of orphan transactions, fix CVE-2013-4627
2013-08-06More unit tests for NUMEQUALGavin Andresen
2013-08-05Merge pull request #2849 from petertodd/if-else-elseGavin Andresen
Add unittests for multiple ELSEs in a row
2013-08-02Simplify storage of orphan transactionsGavin Andresen
Orphan transactions were stored as a CDataStream pointer; this changes the mapOrphanTransactions data structures to store orphans as a CTransaction. This also fixes CVE-2013-4627 by always re-serializing transactions before relaying them.
2013-07-31Move internal miner/block creation to separate miner.cpp module.Jeff Garzik
Public functions referenced elsewhere are added to miner.h.
2013-07-23Add unittests for multiple ELSEs in a rowPeter Todd
IF ELSE ELSE ENDIF is a valid construct; execution or non-execution inverts on each ELSE encountered.
2013-07-15BIP32 test vectorsPieter Wuille
2013-07-10Merge pull request #2743 from jgarzik/reject-reasonJeff Garzik
Log reason for non-standard transaction rejection
2013-07-07Make the rand tests determinstic. (fixes #2714)Gregory Maxwell
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.
2013-06-23Pulled CheckBlock out of CBlock.Eric Lombrozo
2013-06-24Add HMAC-SHA512 to hashPieter Wuille
2013-06-23Log reason for non-standard transaction rejectionJeff Garzik
2013-06-19Introduce a CChainParameters singleton class and regtest mode.Mike Hearn
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.
2013-06-05Removed AcceptToMemoryPool method from CTransaction. This method belongs to ↵Eric Lombrozo
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.
2013-06-03Merge pull request #2727 from TheBlueMatt/masterWladimir J. van der Laan
One more data-driven test-case
2013-06-02Add new data-driven test-case.Matt Corallo
2013-06-01remove GetBoolArg() fDefault parameter defaulting to falsePhilip Kaufmann
- 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
2013-05-30Merge pull request #2600 from sipa/keyrefactorJeff Garzik
Refactor key.cpp/.h
2013-05-30Merge pull request #2104 from al42and/listreceivedbyaddress_txidsJeff Garzik
listreceivedbyaddress now provides tx ids (issue #1149)
2013-05-30Merge pull request #2657 from gmaxwell/its_after_may15_foreverJeff Garzik
It's after 2013-05-15 forever now, so remove the code for the May 15 fork
2013-05-30CSecret/CKey -> CKey/CPubKey split/refactorPieter Wuille
2013-05-21Add a few data-driven tests for SIGHASH_ANYONECANPAYMatt Corallo
2013-05-16It's after 2013-05-15 forever now, so remove the code for the May 15 fork.Gregory Maxwell
2013-05-03Define dust transaction outputs, and make them non-standardGavin Andresen
2013-05-03Remove flaky util thread unit testsGavin Andresen
2013-04-03Port Thread* methods to boost::thread_groupGavin Andresen
2013-04-03LoopForever and ThreadTrace helpersGavin Andresen
2013-04-03Fix signed/unsigned comparison warningsGavin Andresen
2013-03-19-alertnotify=<cmd>Gavin Andresen
Runs a shell command when an AppliesToMe() alert is received. %s in the <cmd> string is replaced with the alert.strStatusBar message.
2013-03-19Some unit tests for CAlertGavin Andresen
2013-03-17Update unit test to match rule enforcement starts 21 MarchGavin Andresen
2013-03-17CheckBlock rule until 15-May for 10,000 BDB lock compatibilityGavin Andresen
2013-03-01Test canonical prunable txout format explicitlyPeter Todd
2013-03-01Add coverage for all invalid opsPeter Todd
0xba thru 0xff
2013-02-18Internal RNG for approximateBestSubset to prevent degenerate behavior.Gregory Maxwell
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.
2013-02-01Make sure the genesis block is present after reindexPieter Wuille
2013-01-30CValidationState frameworkPieter Wuille
2013-01-17Merge pull request #2060 from sipa/parallelGavin Andresen
Parallel script verification
2013-01-16Add nFlags to CBloomFilter to make filter updating optional.Matt Corallo
2013-01-16Use CPartialMerkleTree for CMerkleBlock transactions.Matt Corallo
2013-01-16Add CPartialMerkleTreePieter Wuille
This adds a compact representation for a subset of a merkle tree's nodes.
2013-01-16Add a nTweak to bloom filters to tweak the seed.Matt Corallo
2013-01-16Add test cases for CMerkleBlock and CBloomFilter.Matt Corallo