aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2014-08-28fix comments ExtractAddress() -> ExtractDestination()jtimon
2014-08-27Merge pull request #4377Pieter Wuille
654871d replace ComputeMinWork with CheckMinWork (jtimon) b343c1a Move CBlockIndex::GetBlockWork() to pow::GetProofIncrement(nBits) (jtimon) c2c02f3 Move UpdateTime to pow (jtimon)
2014-08-26Merge pull request #4748Pieter Wuille
ad49c25 Split up util.cpp/h (Wladimir J. van der Laan) f841aa2 Move `COIN` and `CENT` to core.h (Wladimir J. van der Laan) 6e5fd00 Move `*Version()` functions to version.h/cpp (Wladimir J. van der Laan) b4aa769 Move `S_I*` constants and `MSG_NOSIGNAL` to compat.h (Wladimir J. van der Laan) af8297c Move functions in wallet.h to implementation file (Wladimir J. van der Laan) 651480c move functions in main and net to implementation files (Wladimir J. van der Laan) 610a8c0 Move SetThreadPriority implementation to util.cpp instead of the header (Wladimir J. van der Laan) f780e65 Remove unused function `ByteReverse` from util.h (Wladimir J. van der Laan) 121d6ad Remove unused `alignup` function from util.h (Wladimir J. van der Laan) d1e26d4 Move CMedianFilter to timedata.cpp (Wladimir J. van der Laan)
2014-08-26Split up util.cpp/hWladimir J. van der Laan
Split up util.cpp/h into: - string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach) - money utilities (parsesmoney, formatmoney) - time utilities (gettime*, sleep, format date): - and the rest (logging, argument parsing, config file parsing) The latter is basically the environment and OS handling, and is stripped of all utility functions, so we may want to rename it to something else than util.cpp/h for clarity (Matt suggested osinterface). Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26Move CMedianFilter to timedata.cppWladimir J. van der Laan
Now that we no longer use the median filter to keep track of the number of blocks of peers, that's the only place it is used.
2014-08-24Test IsPushOnly() with invalid pushPeter Todd
2014-08-24Merge pull request #4618Pieter Wuille
eb0b56b Simplify serialize.h's exception handling (Pieter Wuille)
2014-08-23replace ComputeMinWork with CheckMinWorkjtimon
2014-08-22Merge pull request #4733Jeff Garzik
2014-08-20Merge pull request #4744Jeff Garzik
2014-08-20rpc_tests: use BOOST_CHECK_EQUALJeff Garzik
Upon failure, BOOST_CHECK_EQUAL provides additional diagnostic information, displaying that data that failed to match.
2014-08-20UniValue tests: use more BOOST_CHECK()Jeff Garzik
2014-08-20UniValue: add unit testsJeff Garzik
2014-08-19Add bitcoin-tx testsJeff Garzik
Testing: delin, delout, locktime, and basic createrawtransaction-like functionality.
2014-08-19bitcoin-tx: Accept input via stdin. Add input handling to tests.Jeff Garzik
2014-08-19Add "it works" test for bitcoin-txJeff Garzik
2014-08-09Simplify serialize.h's exception handlingPieter Wuille
Remove the 'state' and 'exceptmask' from serialize.h's stream implementations, as well as related methods. As exceptmask always included 'failbit', and setstate was always called with bits = failbit, all it did was immediately raise an exception. Get rid of those variables, and replace the setstate with direct exception throwing (which also removes some dead code). As a result, good() is never reached after a failure (there are only 2 calls, one of which is in tests), and can just be replaced by !eof(). fail(), clear(n) and exceptions() are just never called. Delete them.
2014-08-01Declare SignatureHash() in script.hjtimon
2014-07-31Merge pull request #4560Wladimir J. van der Laan
d2d9dc0 script tests: add tests for CHECKMULTISIG limits (Otto Allmendinger) 89101c6 script test: test case for 5-byte bools (Otto Allmendinger) 4cac5db script tests: value with trailing 0x00 is true (Otto Allmendinger) 833ff16 script tests: values that overflow to 0 are true (Otto Allmendinger) 0072d98 script tests: BOOLAND, BOOLOR decode to integer (Otto Allmendinger) ed02282 additional test for OP_SIZE in script_valid.json (Otto Allmendinger)
2014-07-31Merge pull request #4568Wladimir J. van der Laan
9c34731 CBloomFilter::clear() method (Tom Harding)
2014-07-29Move ParseScript() helper, becoming accessible outside src/test/Jeff Garzik
2014-07-21CBloomFilter::clear() methodTom Harding
2014-07-21Revert "CBloomFilter::clear() method"Wladimir J. van der Laan
This reverts commit 8fbf03995df9a2003be603be1a930bc3373d56e0.
2014-07-18script tests: add tests for CHECKMULTISIG limitsOtto Allmendinger
2014-07-18script test: test case for 5-byte boolsOtto Allmendinger
2014-07-18script tests: value with trailing 0x00 is trueOtto Allmendinger
2014-07-18script tests: values that overflow to 0 are trueOtto Allmendinger
2014-07-18script tests: BOOLAND, BOOLOR decode to integerOtto Allmendinger
unlike other boolean checks, arguments >5 bytes invalidate the script
2014-07-18additional test for OP_SIZE in script_valid.jsonOtto Allmendinger
2014-07-09move rand functions from util to new random.h/.cppPhilip Kaufmann
2014-07-07test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibilityLuke Dashjr
2014-07-07Merge pull request #4045Wladimir J. van der Laan
a3e192a replaced MINE_ with ISMINE_ (JaSK) 53a2148 fixed bug where validateaddress doesn't display information (JaSK) f28707a fixed bug in ListReceived() (JaSK) 519dd1c Added MINE_ALL = (spendable|watchonly) (JaSK) 23b0506 Fixed some stuff in TransactionDesc (JaSK) 80dda36 removed default argument values for ismine filter (JaSK) d5087d1 Use script matching rather than destination matching for watch-only. (Pieter Wuille) 0fa2f88 added includedWatchonly argument to listreceivedbyaddress/...account (JaSK) f87ba3d added includeWatchonly argument to 'gettransaction' because it affects balance calculation (JaSK) a5c6c5d fixed tiny glitch and improved readability like laanwj suggested (JaSK) d7d5d23 Added argument to listtransactions and listsinceblock to include watchonly addresses (JaSK) 952877e Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address. (JaSK) 83f3543 Added argument to listaccounts to include watchonly addresses (JaSK) d4640d7 Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. (JaSK) d2692f6 Watchonly transactions are marked in transaction history (JaSK) ffd40da Watchonly balances are shown separately in gui. (JaSK) 2935b21 qt: Hide unspendable outputs in coin control (Wladimir J. van der Laan) c898846 Add support for watch-only addresses (Pieter Wuille)
2014-07-07Merge pull request #4470Wladimir J. van der Laan
f4b00be Add CChain::GetLocator() unit test (Pieter Wuille) 3c85d2e Fix CChain::GetLocator (Pieter Wuille)
2014-07-07Move ui_interface to bitcoin_server.aWladimir J. van der Laan
There is no need for it in the utility libraries or tools. Put it in init.cpp, and in the tests separately (as they can't link init).
2014-07-06Add CChain::GetLocator() unit testPieter Wuille
2014-07-02Add support for watch-only addressesPieter Wuille
Changes: * Add Add/Have WatchOnly methods to CKeyStore, and implementations in CBasicKeyStore. * Add similar methods to CWallet, and support entries for it in CWalletDB. * Make IsMine in script/wallet return a new enum 'isminetype', rather than a boolean. This allows distinguishing between spendable and unspendable coins. * Add a field fSpendable to COutput (GetAvailableCoins' return type). * Mark watchonly coins in listunspent as 'watchonly': true. * Add 'watchonly' to validateaddress, suppressing script/pubkey/... in this case. Based on a patch by Eric Lombrozo. Conflicts: src/qt/walletmodel.cpp src/rpcserver.cpp src/wallet.cpp
2014-06-30test: Fix warning about integer signedness in P2SH testsWladimir J. van der Laan
2014-06-30Merge pull request #3883 from dgenr8/first_double_spendGavin Andresen
Relay and alert user to double spends
2014-06-29Add skiplist unit testsPieter Wuille
2014-06-27CBloomFilter::clear() methodTom Harding
2014-06-27Merge pull request #4365 from gavinandresen/relax_isstandardGavin Andresen
Relax IsStandard rules for pay-to-script-hash transactions
2014-06-25Remove timing-based signature cache unit testGavin Andresen
Two changes: First removes a unit test that fails in my development environment (OSX, compiled -g3 with clang). sipa says that's not terribly surprising; the CMutableTransaction change makes signing a little more expensive but verification quicker. The unit test timed sign+verify-uncached versus verify-cached-five-times. He also says the test will be invalid when libsec256kp1 is integrated (because validation is super-optimized over signing). core.h change fixes a compiler warning (clang -Wall : CMutableTransaction defined as struct, declared as class in script.h).
2014-06-25Remove unnecessary dependencies for bitcoin-cliWladimir J. van der Laan
This commit removes all the unnecessary dependencies (key, core, netbase, sync, ...) from bitcoin-cli. To do this it shards the chain parameters into BaseParams, which contains just the RPC port and data directory (as used by utils and bitcoin-cli) and Params, with the rest.
2014-06-23Refactor proof of work related functions out of mainjtimon
2014-06-23Relax IsStandard rules for pay-to-script-hash transactionsGavin Andresen
Relax the AreInputsStandard() tests for P2SH transactions -- allow any Script in a P2SH transaction to be relayed/mined, as long as it has 15 or fewer signature operations. Rationale: https://gist.github.com/gavinandresen/88be40c141bc67acb247 I don't have an easy way to test this, but the code changes are straightforward and I've updated the AreInputsStandard unit tests.
2014-06-22Code simplifications after CTransaction::GetHash() cachingPieter Wuille
2014-06-21Add CMutableTransaction and make CTransaction immutable.Pieter Wuille
In addition, introduce a cached hash inside CTransaction, to prevent recalculating it over and over again.
2014-06-21Add <Hasher>::OUTPUT_SIZEPieter Wuille
2014-06-21Extend and move all crypto tests to crypto_tests.cppPieter Wuille
2014-06-21Move crypto implementations to src/crypto/Pieter Wuille