aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_bitcoin.cpp
AgeCommit message (Collapse)Author
2016-09-21Use a signal to continue init after genesis activationPieter Wuille
Github-Pull: #8392 Rebased-From: 0fd2a33648ccde4b989f1d69529daea4d88b14a2
2016-06-22BIP141: Other consensus critical limits, and BIP145Pieter Wuille
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22Merge #8068: Compact BlocksWladimir J. van der Laan
48efec8 Fix some minor compact block issues that came up in review (Matt Corallo) ccd06b9 Elaborate bucket size math (Pieter Wuille) 0d4cb48 Use vTxHashes to optimize InitData significantly (Matt Corallo) 8119026 Provide a flat list of txid/terators to txn in CTxMemPool (Matt Corallo) 678ee97 Add BIP 152 to implemented BIPs list (Matt Corallo) 56ba516 Add reconstruction debug logging (Matt Corallo) 2f34a2e Get our "best three" peers to announce blocks using cmpctblocks (Matt Corallo) 927f8ee Add ability to fetch CNode by NodeId (Matt Corallo) d25cd3e Add receiver-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo) 9c837d5 Add sender-side protocol implementation for CMPCTBLOCK stuff (Matt Corallo) 00c4078 Add protocol messages for short-ids blocks (Matt Corallo) e3b2222 Add some blockencodings tests (Matt Corallo) f4f8f14 Add TestMemPoolEntryHelper::FromTx version for CTransaction (Matt Corallo) 85ad31e Add partial-block block encodings API (Matt Corallo) 5249dac Add COMPACTSIZE wrapper similar to VARINT for serialization (Matt Corallo) cbda71c Move context-required checks from CheckBlockHeader to Contextual... (Matt Corallo) 7c29ec9 If AcceptBlockHeader returns true, pindex will be set. (Matt Corallo) 96806c3 Stop trimming when mapTx is empty (Pieter Wuille)
2016-06-19Add TestMemPoolEntryHelper::FromTx version for CTransactionMatt Corallo
2016-06-18Enable mempool consistency checks in unit testsPieter Wuille
2016-05-18Refactor CreateNewBlock to be a method of the BlockAssembler classAlex Morcos
2016-04-19Merge #7787: [Moveonly] Create ui_interface.cppWladimir J. van der Laan
fa10ce6 Move ui_interface.cpp to libbitcoin_server_a_SOURCES (MarcoFalke) fabbf80 [ui] Move InitError, InitWarning, AmountErrMsg (MarcoFalke)
2016-04-18test: Create test fixture for walletWladimir J. van der Laan
Removes all the `#ifdef ENABLE_WALLET` from `test_bitcoin` by making the wallet tests use their own fixture.
2016-04-02[ui] Move InitError, InitWarning, AmountErrMsgMarcoFalke
2016-04-02Merge #7691: [Wallet] refactor wallet/init interactionWladimir J. van der Laan
25340b7 [Wallet] refactor wallet/init interaction (Jonas Schnelli)
2016-03-31rpc: Register calls where they are definedWladimir J. van der Laan
Split out methods to every module, apart from 'help' and 'stop' which are implemented in rpcserver.cpp itself. - This makes it easier to add or remove RPC commands - no longer everything that includes rpcserver.h has to be rebuilt when there's a change there. - Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions. - Removes most of the bitcoin-specific code from rpcserver.cpp and .h. Continues #7307 for the non-wallet.
2016-03-22[Wallet] refactor wallet/init interactionJonas Schnelli
2016-03-16Merge #7187: Keep reorgs fast for SequenceLocks checksWladimir J. van der Laan
982670c Add LockPoints (Alex Morcos)
2016-03-16Add LockPointsAlex Morcos
Obtain LockPoints to store in CTxMemPoolEntry and during a reorg, evaluate whether they are still valid and if not, recalculate them.
2016-03-11Move GetTempPath() to testutil.Mustafa
2016-01-20[RPC, Wallet] Move RPC dispatch table registration to wallet/ codeJonas Schnelli
Allow extending the rpc dispatch table by appending commands when server is not running.
2015-12-13Bump copyright headers to 2015MarcoFalke
2015-12-01Store the total sig op count of a tx.Alex Morcos
Store sum of legacy and P2SH sig op counts. This is calculated in AcceptToMemory pool and storing it saves redoing the expensive calculation in block template creation.
2015-11-30Track coinbase spends in CTxMemPoolEntrySuhas Daftuar
This allows us to optimize CTxMemPool::removeForReorg.
2015-11-19Change GetPriority calculation.Alex Morcos
Compute the value of inputs that already are in the chain at time of mempool entry and only increase priority due to aging for those inputs. This effectively changes the CTxMemPoolEntry's GetPriority calculation from an upper bound to a lower bound.
2015-11-27Merge pull request #7053Wladimir J. van der Laan
2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
2015-11-23Globals: Remove a bunch of Params() calls from main.cpp:Jorge Timón
1) Chainparams: Explicit CChainParams arg for main: -AcceptBlock -AcceptBlockHeader -ActivateBestChain -ConnectTip -InitBlockIndex -LoadExternalBlockFile -VerifyDB parametric constructor 2) Also pickup more Params()\. in main.cpp 3) Pass nPruneAfterHeight explicitly to new FindFilesToPrune() in main.cpp
2015-11-16Implement helper class for CTxMemPoolEntry constructorAlex Morcos
This is only for unit tests.
2015-11-11Chainparams: Explicit CChainParams arg for miner:Jorge Timón
-BitcoinMiner -CreateNewBlock -GenerateBitcoins -ProcessBlockFound
2015-11-11Chainparams: Explicit CChainParams arg for main (pre miner):Jorge Timón
-ProcessNewBlock -TestBlockValidity
2015-11-01tests: Initialize networking on windowsWladimir J. van der Laan
2015-10-20Chainparams: Replace CBaseChainParams::Network enum with string constants ↵Jorge Timón
(suggested by Wladimir)
2015-07-27Unit test doublespends in new blocksGavin Andresen
As suggested by Greg Maxwell-- unit test to make sure a block with a double-spend in it doesn't pass validation if half of the double-spend is already in the memory pool (so full-blown transaction validation is skipped) when the block is received.
2015-07-23TRIVIAL: Missing includesJorge Timón
2015-05-06Merge pull request #6047Wladimir J. van der Laan
a56054b Update key.cpp to use new libsecp256k1 (Pieter Wuille) a591d98 Squashed 'src/secp256k1/' changes from 1897b8e..22f60a6 (Pieter Wuille)
2015-05-04Update key.cpp to use new libsecp256k1Pieter Wuille
libsecp256k1's API changed, so update key.cpp to use it. Libsecp256k1 now has explicit context objects, which makes it completely thread-safe. In turn, keep an explicit context object in key.cpp, which is explicitly initialized destroyed. This is not really pretty now, but it's more efficient than the static initialized object in key.cpp (which made for example bitcoin-tx slow, as for most of its calls, libsecp256k1 wasn't actually needed). This also brings in the new blinding support in libsecp256k1. By passing in a random seed, temporary variables during the elliptic curve computations are altered, in such a way that if an attacker does not know the blind, observing the internal operations leaks less information about the keys used. This was implemented by Greg Maxwell.
2015-04-16Separate CTranslationInterface from CClientUIInterfaceJorge Timón
2015-04-01Merge pull request #5900Wladimir J. van der Laan
3fcfbc8 Add a consistency check for the block chain data structures (Pieter Wuille)
2015-03-29Initialization: setup environment before starting testsdexX7
The environment is prepared by the main thread to guard against invalid locale settings and to prevent deinitialization issues of Boost path, which can result in app crashes.
2015-03-27Add a consistency check for the block chain data structuresPieter Wuille
This adds a -checkblockindex (defaulting to true for regtest), which occasionally does a full consistency check for mapBlockIndex, setBlockIndexCandidates, chainActive, and mapBlocksUnlinked.
2015-03-20Merge pull request #5745Wladimir J. van der Laan
50c72f2 [Move Only] Move wallet related things to src/wallet/ (Jonas Schnelli)
2015-03-12[Move Only] Move wallet related things to src/wallet/Jonas Schnelli
could once be renamed from /src/wallet to /src/legacywallet.
2015-03-12tests: add a BasicTestingSetup and apply to all testsWladimir J. van der Laan
Make sure that chainparams and logging is properly initialized. Doing this for every test may be overkill, but this initialization is so simple that that does not matter. This should fix the travis issues.
2015-03-09test: Remove UNITTEST paramsWladimir J. van der Laan
UNITTEST parameter are not used by any current tests, and the model (modifyable parameters) is inconvenient when unit-testing. As they are stored in a global structure eevery test would have to (re)set up its own parameters. For consistency it is also better to test with MAIN parameters.
2015-03-03Reinitialize state in between individual unit tests.Pieter Wuille
This changes the TestingSetup fixture to be per-unit-test rather than global. Most tests don't need it, so it's only invoked in a few.
2014-12-16Remove references to X11 licenceMichael Ford
2014-10-20Rename CWalletInterface to CValidationInterfacePieter Wuille
It's useful for much more than wallets.
2014-10-08Merge pull request #4834Pieter Wuille
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille) ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille) 058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille) c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille) f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
2014-10-02Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-10-02Revert merge of pull #4845Wladimir J. van der Laan
It breaks the new mingw tests! See - https://travis-ci.org/bitcoin/bitcoin/jobs/36845581 - https://travis-ci.org/bitcoin/bitcoin/jobs/36845582 This reverts commit 470590277782cce2fe73275c74523aef59a51eab, 5e2e7fcb99738d9254d4030d53e4f711b2fc5ee0, a25fd6be138ff2bff7e2ad6a1a789db523c0193f.
2014-09-29Switch testing framework from MAIN to new UNITTEST networkSergioDemianLerner
UNITTEST inherites from MAIN but allows synamically changing its parameters using the ModifiableParams() interface
2014-09-24Get rid of the dummy CCoinsViewCache constructor argPieter Wuille
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-07-09move rand functions from util to new random.h/.cppPhilip Kaufmann
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).