aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2012-05-26Merge pull request #1357 from sipa/keyidPieter Wuille
Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddress
2012-05-25Remove newlines from JSON stringsGavin Andresen
Newlines in JSON strings are against the JSON spec, so remove them from the script*.json unit tests to make python's jsonrpc happy (json::spirit didn't care).
2012-05-25Unit tests for transaction size limitsGavin Andresen
2012-05-24Lots more Script unit test cases.Gavin Andresen
2012-05-24Refactor: split CKeyID/CScriptID/CTxDestination from CBitcoinAddressPieter Wuille
This introduces internal types: * CKeyID: reference (hash160) of a key * CScriptID: reference (hash160) of a script * CTxDestination: a boost::variant of the former two CBitcoinAddress is retrofitted to be a Base58 encoding of a CTxDestination. This allows all internal code to only use the internal types, and only have RPC and GUI depend on the base58 code. Furthermore, the header dependencies are a lot saner now. base58.h is at the top (right below rpc and gui) instead of at the bottom. For the rest: wallet -> script -> keystore -> key. Only keystore still requires a forward declaration of CScript. Solving that would require splitting script into two layers.
2012-05-24Encapsulate public keys in CPubKeyPieter Wuille
2012-05-24More CScript unit tests.Gavin Andresen
2012-05-24DoS_tests: fix signed/unsigned comparison warningsJeff Garzik
test/DoS_tests.cpp: In member function ‘void DoS_tests::DoS_mapOrphans::test_method()’: test/DoS_tests.cpp:200:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] test/DoS_tests.cpp:208:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] test/DoS_tests.cpp: In member function ‘void DoS_tests::DoS_checkSig::test_method()’: test/DoS_tests.cpp:260:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] test/DoS_tests.cpp:267:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] test/DoS_tests.cpp:280:41: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] test/DoS_tests.cpp:307:37: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2012-05-22Merge branch 'optimize'Gavin Andresen
2012-05-20Make testcases build, prevent windows symbol collisionWladimir J. van der Laan
2012-05-18change strings to Bitcoin (uppercase), where it is used as a noun and update ↵Philip Kaufmann
strings to use "Qt" (and not qt or QT) / update initialisation of notificator to use qApp->applicationName() instead of a static string
2012-05-18Cache signature verificationsGavin Andresen
Create a maximum-10MB signature verification result cache. This should almost double the number of transactions that can be processed on a given CPU, because before this change ECDSA signatures were verified when transactions were added to the memory pool and then again when they appeared in a block.
2012-05-18Optimize orphan transaction handlingGavin Andresen
Changes suggested by Sergio Demian Lerner to help prevent potential DoS attacks.
2012-05-17Refactor: GetRandHash() method for utilGavin Andresen
2012-05-09Clean up warningsPieter Wuille
* Use -Wall -Wextra -Wformat -Wformat-security -Wno-unused-parameters * Remove xCXXFLAGS usage in makefile.unix * Fix several recent and older sign-compare warnings
2012-05-04Support for multiple local addressesPieter Wuille
2012-04-26Define TEST_DATA_DIR so unit tests can be run from any current working directoryGavin Andresen
2012-04-23SigOp and orphan-tx constants and counts are always unsigned.Jeff Garzik
Fixes several sign-comparison warnings.
2012-04-21Merge pull request #1124 from sipa/rpcobj3Pieter Wuille
extension of #1103: encapsulate mapCommands in CRPCTable
2012-04-21Merge pull request #1131 from laanwj/2012_04_hexstrPieter Wuille
Integrate @JoelKatz's optimized ToHex (#562) into current HexStr function
2012-04-21Data-drive script evaluation unit tests.Gavin Andresen
2012-04-21Integrate @JoelKatz's optimized ToHex (#562) into current HexStr functionWladimir J. van der Laan
2012-04-21Expose CRPCTable via bitcoinrpc.h for testingPieter Wuille
2012-04-17Fix tests after recent refactorsPieter Wuille
2012-04-12CBitcoinSecret::SetString() now calls IsValid() to make sure it was passed ↵Chris Moore
something with the correct version.
2012-04-09Use scoped locks instead of CRITICAL_BLOCKPieter Wuille
2012-02-29DoS fix for mapOrphanTransactionsv0.6.0rc2Gavin Andresen
2012-02-27Add mruset and use it for setInventoryKnownPieter Wuille
2012-02-20Fix tests after 38067c18Pieter Wuille
2012-02-07New GetArg features: allow --, and booleans can be -foo or -nofooGavin Andresen
2012-02-07Unit tests for the GetArg() methodsGavin Andresen
2012-02-07Merge branch 'standardScriptSigs' of github.com:gavinandresen/bitcoin-gitGavin Andresen
2012-01-20Simplify counting of P2SH sigops to match BIP 16 (thanks to Matt Corallo for ↵Gavin Andresen
prompting this). This also removes an un-needed sigops-per-byte check when accepting transactions to the memory pool (un-needed assuming only standard transactions are being accepted). And it only counts P2SH sigops after the switchover date.
2012-01-19Make transactions with extra data in their scriptSig's non-standard.Gavin Andresen
2012-01-13Refactored ConnectInputs, so valid-transaction-checks are done before ↵Gavin Andresen
ECDSA-verifying signatures.
2012-01-13Replace OP_EVAL (BIP 12) with Pay-to-script-hash (BIP 16).Gavin Andresen
2012-01-09Unit tests for EC key routinesPieter Wuille
This tests: * creation of keys from base58-encoded strings * extracting public keys and addresses * compressed public keys * compact signatures and key recovery
2012-01-06Network stack refactorPieter Wuille
This introduces CNetAddr and CService, respectively wrapping an (IPv6) IP address and an IP+port combination. This functionality used to be part of CAddress, which also contains network flags and connection attempt information. These extra fields are however not always necessary. These classes, along with logic for creating connections and doing name lookups, are moved to netbase.{h,cpp}, which does not depend on headers.h. Furthermore, CNetAddr is mostly IPv6-ready, though IPv6 functionality is not yet enabled for the application itself.
2012-01-03make sure IsMine only returns true when we own all keyscoderrr
2011-12-27Fixed OP_EVAL recursion unit test, checks for both infinite and ↵Gavin Andresen
exactly-3-deep recursion
2011-12-22Fix broken ExtractAddress (refactored, made callers check for addresses in ↵Gavin Andresen
keystore if they care)
2011-12-21Revert "Use standard C99 (and Qt) types for 64-bit integers"Wladimir J. van der Laan
This reverts commit 21d9f36781604e4ca9fc35dc65265593423b73e9.
2011-12-20Use standard C99 (and Qt) types for 64-bit integersLuke Dashjr
2011-12-19Use block times for 'hard' OP_EVAL switchover, and refactored EvalScriptGavin Andresen
so it takes a flag for how to interpret OP_EVAL. Also increased IsStandard size of scriptSigs to 500 bytes, so a 3-of-3 multisig transaction IsStandard.
2011-12-19Interpret OP_EVAL as OP_NOP until Feb 1, 2012Gavin Andresen
2011-12-19OP_EVAL implementationGavin Andresen
OP_EVAL is a new opcode that evaluates an item on the stack as a script. It enables a new type of bitcoin address that needs an arbitrarily complex script to redeem.
2011-12-19Global fixture to send output to console instead of debug.logGavin Andresen
2011-12-19Support 3 new multisignature IsStandard transactionsGavin Andresen
Initial support for (a and b), (a or b), and 2-of-3 escrow transactions (where a, b, and c are keys).
2011-12-19Rework unit tests so test_bitcoin.cpp does not #include them allGavin Andresen
2011-12-01Orphan block fill-up-memory attack preventionGavin Andresen