aboutsummaryrefslogtreecommitdiff
path: root/src/test
Commit message (Collapse)AuthorAgeFilesLines
* Return shared_ptr<CTransaction> from mempool removesPieter Wuille2016-10-212-2/+3
|
* Make removed and conflicted arguments optional to removePieter Wuille2016-10-214-24/+19
|
* Merge #8927: Add script tests for FindAndDelete in pre-segwit and segwit scriptsWladimir J. van der Laan2016-10-192-0/+49
|\ | | | | | | acf853d Add script tests for FindAndDelete in pre-segwit and segwit scripts (Johnson Lau)
| * Add script tests for FindAndDelete in pre-segwit and segwit scriptsJohnson Lau2016-10-162-0/+49
| |
* | Merge #7948: RPC: augment getblockchaininfo bip9_softforks dataWladimir J. van der Laan2016-10-191-41/+63
|\ \ | | | | | | | | | fc14609 RPC: augment getblockchaininfo bip9_softforks data (mruddy)
| * | RPC: augment getblockchaininfo bip9_softforks datamruddy2016-10-191-41/+63
| | |
* | | [RPC] Give RPC commands more information about the RPC requestJonas Schnelli2016-10-191-2/+5
|/ /
* | Merge #8865: Decouple peer-processing-logic from block-connection-logicWladimir J. van der Laan2016-10-182-2/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a9aec5c Use BlockChecked signal to send reject messages from mapBlockSource (Matt Corallo) 7565e03 Remove SyncWithWallets wrapper function (Matt Corallo) 12ee1fe Always call UpdatedBlockTip, even if blocks were only disconnected (Matt Corallo) f5efa28 Remove CConnman parameter from ProcessNewBlock/ActivateBestChain (Matt Corallo) fef1010 Use CValidationInterface from chain logic to notify peer logic (Matt Corallo) aefcb7b Move net-processing logic definitions together in main.h (Matt Corallo) 0278fb5 Remove duplicate nBlocksEstimate cmp (we already checked IsIBD()) (Matt Corallo) 87e7d72 Make validationinterface.UpdatedBlockTip more verbose (Matt Corallo)
| * | Remove CConnman parameter from ProcessNewBlock/ActivateBestChainMatt Corallo2016-10-042-2/+2
| | |
* | | Merge #8223: [c++11] Use std::unique_ptr for block creation.Wladimir J. van der Laan2016-10-182-13/+7
|\ \ \ | | | | | | | | | | | | 9fce062 [c++11] Use std::unique_ptr for block creation. (Daniel Kraft)
| * | | [c++11] Use std::unique_ptr for block creation.Daniel Kraft2016-06-182-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | CreateNewBlock returns a pointer for which the caller takes ownership. Use std::unique_ptr to make this explicit and simplify handling of these objects in getblocktemplate.
* | | | Merge #8914: Kill insecure_random and associated global stateWladimir J. van der Laan2016-10-1814-21/+41
|\ \ \ \ | | | | | | | | | | | | | | | 5eaaa83 Kill insecure_random and associated global state (Wladimir J. van der Laan)
| * | | | Kill insecure_random and associated global stateWladimir J. van der Laan2016-10-1714-21/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are only a few uses of `insecure_random` outside the tests. This PR replaces uses of insecure_random (and its accompanying global state) in the core code with an FastRandomContext that is automatically seeded on creation. This is meant to be used for inner loops. The FastRandomContext can be in the outer scope, or the class itself, then rand32() is used inside the loop. Useful e.g. for pushing addresses in CNode or the fee rounding, or randomization for coin selection. As a context is created per purpose, thus it gets rid of cross-thread unprotected shared usage of a single set of globals, this should also get rid of the potential race conditions. - I'd say TxMempool::check is not called enough to warrant using a special fast random context, this is switched to GetRand() (open for discussion...) - The use of `insecure_rand` in ConnectThroughProxy has been replaced by an atomic integer counter. The only goal here is to have a different credentials pair for each connection to go on a different Tor circuit, it does not need to be random nor unpredictable. - To avoid having a FastRandomContext on every CNode, the context is passed into PushAddress as appropriate. There remains an insecure_random for test usage in `test_random.h`.
* | | | | test segwit uncompressed key fixesJohnson Lau2016-10-172-1/+460
| | | | |
* | | | | Require compressed keys in segwit as policy and disable signing with ↵Johnson Lau2016-10-162-26/+11
| |_|_|/ |/| | | | | | | | | | | uncompressed keys for segwit scripts
* | | | Merge #8817: update bitcoin-tx to output witness dataWladimir J. van der Laan2016-10-1311-0/+11
|\ \ \ \ | |/ / / |/| | | | | | | 4408558 Update bitcoin-tx to output witness data. (jonnynewbs)
| * | | Update bitcoin-tx to output witness data.jonnynewbs2016-10-0511-0/+11
| | |/ | |/|
* | | Merge #8393: Support for compact blocks together with segwitPieter Wuille2016-10-101-3/+3
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 27acfc1 [qa] Update p2p-compactblocks.py for compactblocks v2 (Suhas Daftuar) 422fac6 [qa] Add support for compactblocks v2 to mininode (Suhas Daftuar) f5b9b8f [qa] Fix bug in mininode witness deserialization (Suhas Daftuar) 6aa28ab Use cmpctblock type 2 for segwit-enabled transfer (Pieter Wuille) be7555f Fix overly-prescriptive p2p-segwit test for new fetch logic (Matt Corallo) 06128da Make GetFetchFlags always request witness objects from witness peers (Matt Corallo)
| * | | Use cmpctblock type 2 for segwit-enabled transferPieter Wuille2016-10-041-3/+3
| |/ / | | | | | | | | | | | | Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar.
* / / add verbose mode to bitcoin-util-test.pyjnewbery2016-10-053-30/+65
|/ /
* | Merge #8830: [test] Add option to run bitcoin-util-test.py manuallyWladimir J. van der Laan2016-09-302-3/+27
|\ \ | | | | | | | | | b82f493 Add option to run bitcoin-util-test.py manually (jnewbery)
| * | Add option to run bitcoin-util-test.py manuallyjnewbery2016-09-292-3/+27
| | |
* | | bitcoin-util-test.py should fail if the output file is emptyjnewbery2016-09-292-0/+22
|/ /
* | Merge #8829: Add bitcoin-tx JSON testsMarcoFalke2016-09-2912-1/+997
|\ \ | | | | | | | | | 54e5d7c Add bitcoin-tx JSON tests (jnewbery)
| * | Add bitcoin-tx JSON testsjnewbery2016-09-2812-1/+997
| | |
* | | Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau2016-09-273-1/+34
| | |
* | | Merge #8526: Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHWladimir J. van der Laan2016-09-273-1/+86
|\ \ \ | |/ / |/| | | | | c72c5b1 Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (Johnson Lau)
| * | Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau2016-09-233-1/+86
| | |
* | | Do not shadow variablesPavel Janík2016-09-273-16/+16
| | |
* | | [test] Remove redundant print in addrman_testsMarcoFalke2016-09-221-3/+2
|/ /
* | Move static global randomizer seeds into CConnmanPieter Wuille2016-09-193-7/+7
| |
* | net: Pass best block known height into CConnmanCory Fields2016-09-082-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CConnman then passes the current best height into CNode at creation time. This way CConnman/CNode have no dependency on main for height, and the signals only move in one direction. This also helps to prevent identity leakage a tiny bit. Before this change, an attacker could theoretically make 2 connections on different interfaces. They would connect fully on one, and only establish the initial connection on the other. Once they receive a new block, they would relay it to your first connection, and immediately commence the version handshake on the second. Since the new block height is reflected immediately, they could attempt to learn whether the two connections were correlated. This is, of course, incredibly unlikely to work due to the small timings involved and receipt from other senders. But it doesn't hurt to lock-in nBestHeight at the time of connection, rather than letting the remote choose the time.
* | net: move nLocalServices/nRelevantServices to CConnmanCory Fields2016-09-082-6/+6
| | | | | | | | | | These are in-turn passed to CNode at connection time. This allows us to offer different services to different peers (or test the effects of doing so).
* | net: move nLastNodeId to CConnmanCory Fields2016-09-082-6/+9
| |
* | net: move ban and addrman functions into CConnmanCory Fields2016-09-081-14/+14
| |
* | net: handle nodesignals in CConnmanCory Fields2016-09-081-0/+4
| |
* | net: Pass CConnman around as neededCory Fields2016-09-083-9/+9
| |
* | net: Create CConnman to encapsulate p2p connectionsCory Fields2016-09-082-0/+8
| |
* | Merge #8671: Minimal fix to slow prevector tests as stopgap measureMarcoFalke2016-09-081-19/+43
|\ \ | | | | | | | | | f71d4a3 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin)
| * | Minimal fix to slow prevector tests as stopgap measureJeremy Rubin2016-09-061-19/+43
| | |
* | | Fix obvious assignment/equality error in testJeremy Rubin2016-09-061-1/+1
|/ /
* | Merge #8449: [Trivial] Do not shadow local variable, cleanupWladimir J. van der Laan2016-09-021-1/+0
|\ \ | | | | | | | | | | | | a159f25 Remove redundand (and shadowing) declaration (Pavel Janík) cce3024 Do not shadow local variable, cleanup (Pavel Janík)
| * | Remove redundand (and shadowing) declarationPavel Janík2016-08-051-1/+0
| | |
* | | Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/Wladimir J. van der Laan2016-09-021-3/+3
|\ \ \ | | | | | | | | | | | | cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
| * | | C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón2016-09-011-3/+3
| | | |
* | | | Merge #8524: Precompute sighashesPieter Wuille2016-09-012-4/+89
|\ \ \ \ | |/ / / |/| | | | | | | | | | | | | | | 35fe039 Rename to PrecomputedTransactionData (Pieter Wuille) ab48c5e Unit test for sighash caching (Nicolas DORIER) d2c5d04 Precompute sighashes (Pieter Wuille)
| * | | Rename to PrecomputedTransactionDataPieter Wuille2016-08-262-8/+8
| | | |
| * | | Unit test for sighash cachingNicolas DORIER2016-08-161-0/+81
| | | |
| * | | Precompute sighashesPieter Wuille2016-08-162-4/+8
| | | | | | | | | | | | | | | | Original version by Nicolas Dorier. Precomputing version by Pieter Wuille.
* | | | Merge #8578: [test] Remove unused codeMarcoFalke2016-08-254-23/+2
|\ \ \ \ | | | | | | | | | | | | | | | fa1cf9e [test] Remove unused code (MarcoFalke)