aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-11-02Merge #8753: Locked memory managerWladimir J. van der Laan
444c673 bench: Add benchmark for lockedpool allocation/deallocation (Wladimir J. van der Laan) 6567999 rpc: Add `getmemoryinfo` call (Wladimir J. van der Laan) 4536148 support: Add LockedPool (Wladimir J. van der Laan) f4d1fc2 wallet: Get rid of LockObject and UnlockObject calls in key.h (Wladimir J. van der Laan) 999e4c9 wallet: Change CCrypter to use vectors with secure allocator (Wladimir J. van der Laan)
2016-10-28test: Add format-dependent comparison to bctestWladimir J. van der Laan
This splits the output comparison for `bitcoin-tx` into two steps: - First, check for data mismatch, parsing the data as json or hex depending on the extension of the output file - Then, check if the literal string matches For either of these cases give a different error. This prevents wild goose chases when e.g. a trailing space doesn't match exactly, and makes sure that both test output and examples are valid data of the purported format.
2016-10-27support: Add LockedPoolWladimir J. van der Laan
Add a pool for locked memory chunks, replacing LockedPageManager. This is something I've been wanting to do for a long time. The current approach of locking objects where they happen to be on the stack or heap in-place causes a lot of mlock/munlock system call overhead, slowing down any handling of keys. Also locked memory is a limited resource on many operating systems (and using a lot of it bogs down the system), so the previous approach of locking every page that may contain any key information (but also other information) is wasteful.
2016-10-21Return shared_ptr<CTransaction> from mempool removesPieter Wuille
2016-10-21Make removed and conflicted arguments optional to removePieter Wuille
2016-10-19Merge #8927: Add script tests for FindAndDelete in pre-segwit and segwit scriptsWladimir J. van der Laan
acf853d Add script tests for FindAndDelete in pre-segwit and segwit scripts (Johnson Lau)
2016-10-19Merge #7948: RPC: augment getblockchaininfo bip9_softforks dataWladimir J. van der Laan
fc14609 RPC: augment getblockchaininfo bip9_softforks data (mruddy)
2016-10-19RPC: augment getblockchaininfo bip9_softforks datamruddy
2016-10-19[RPC] Give RPC commands more information about the RPC requestJonas Schnelli
2016-10-18Merge #8865: Decouple peer-processing-logic from block-connection-logicWladimir J. van der Laan
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)
2016-10-18Merge #8223: [c++11] Use std::unique_ptr for block creation.Wladimir J. van der Laan
9fce062 [c++11] Use std::unique_ptr for block creation. (Daniel Kraft)
2016-10-18Merge #8914: Kill insecure_random and associated global stateWladimir J. van der Laan
5eaaa83 Kill insecure_random and associated global state (Wladimir J. van der Laan)
2016-10-17Kill insecure_random and associated global stateWladimir J. van der Laan
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`.
2016-10-17test segwit uncompressed key fixesJohnson Lau
2016-10-16Require compressed keys in segwit as policy and disable signing with ↵Johnson Lau
uncompressed keys for segwit scripts
2016-10-16Add script tests for FindAndDelete in pre-segwit and segwit scriptsJohnson Lau
2016-10-13Merge #8817: update bitcoin-tx to output witness dataWladimir J. van der Laan
4408558 Update bitcoin-tx to output witness data. (jonnynewbs)
2016-10-10Merge #8393: Support for compact blocks together with segwitPieter Wuille
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)
2016-10-05add verbose mode to bitcoin-util-test.pyjnewbery
2016-10-05Update bitcoin-tx to output witness data.jonnynewbs
2016-10-04Remove CConnman parameter from ProcessNewBlock/ActivateBestChainMatt Corallo
2016-10-04Use cmpctblock type 2 for segwit-enabled transferPieter Wuille
Contains version negotiation logic by Matt Corallo and bugfixes by Suhas Daftuar.
2016-09-30Merge #8830: [test] Add option to run bitcoin-util-test.py manuallyWladimir J. van der Laan
b82f493 Add option to run bitcoin-util-test.py manually (jnewbery)
2016-09-29bitcoin-util-test.py should fail if the output file is emptyjnewbery
2016-09-29Add option to run bitcoin-util-test.py manuallyjnewbery
2016-09-29Merge #8829: Add bitcoin-tx JSON testsMarcoFalke
54e5d7c Add bitcoin-tx JSON tests (jnewbery)
2016-09-28Add bitcoin-tx JSON testsjnewbery
2016-09-27Add policy: null signature for failed CHECK(MULTI)SIGJohnson Lau
2016-09-27Merge #8526: Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHWladimir J. van der Laan
c72c5b1 Make non-minimal OP_IF/NOTIF argument non-standard for P2WSH (Johnson Lau)
2016-09-27Do not shadow variablesPavel Janík
2016-09-23Make non-minimal OP_IF/NOTIF argument non-standard for P2WSHJohnson Lau
2016-09-22[test] Remove redundant print in addrman_testsMarcoFalke
2016-09-19Move static global randomizer seeds into CConnmanPieter Wuille
2016-09-08net: Pass best block known height into CConnmanCory Fields
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.
2016-09-08net: move nLocalServices/nRelevantServices to CConnmanCory Fields
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).
2016-09-08net: move nLastNodeId to CConnmanCory Fields
2016-09-08net: move ban and addrman functions into CConnmanCory Fields
2016-09-08net: handle nodesignals in CConnmanCory Fields
2016-09-08net: Pass CConnman around as neededCory Fields
2016-09-08net: Create CConnman to encapsulate p2p connectionsCory Fields
2016-09-08Merge #8671: Minimal fix to slow prevector tests as stopgap measureMarcoFalke
f71d4a3 Minimal fix to slow prevector tests as stopgap measure (Jeremy Rubin)
2016-09-06Fix obvious assignment/equality error in testJeremy Rubin
2016-09-06Minimal fix to slow prevector tests as stopgap measureJeremy Rubin
2016-09-02Merge #8449: [Trivial] Do not shadow local variable, cleanupWladimir J. van der Laan
a159f25 Remove redundand (and shadowing) declaration (Pavel Janík) cce3024 Do not shadow local variable, cleanup (Pavel Janík)
2016-09-02Merge #8629: C++11: s/boost::scoped_ptr/std::unique_ptr/Wladimir J. van der Laan
cdd79eb C++11: s/boost::scoped_ptr/std::unique_ptr/ (Jorge Timón)
2016-09-01C++11: s/boost::scoped_ptr/std::unique_ptr/Jorge Timón
2016-09-01Merge #8524: Precompute sighashesPieter Wuille
35fe039 Rename to PrecomputedTransactionData (Pieter Wuille) ab48c5e Unit test for sighash caching (Nicolas DORIER) d2c5d04 Precompute sighashes (Pieter Wuille)
2016-08-26Rename to PrecomputedTransactionDataPieter Wuille
2016-08-25Merge #8578: [test] Remove unused codeMarcoFalke
fa1cf9e [test] Remove unused code (MarcoFalke)
2016-08-24[test] Remove unused codeMarcoFalke