aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2016-11-17Merge #9075: Decouple peer-processing-logic from block-connection-logic (#3)Pieter Wuille
ae22357 Replace CValidationState param in ProcessNewBlock with BlockChecked (Matt Corallo) 7c98ce5 Remove pfrom parameter from ProcessNewBlock (Matt Corallo) e2e069d Revert "RPC: Give more details when "generate" fails" (Matt Corallo)
2016-11-11Merge #8996: Network activity toggleJonas Schnelli
19f46f1 Qt: New network_disabled icon (Luke Dashjr) 54cf997 RPC/Net: Use boolean consistently for networkactive, and remove from getinfo (Luke Dashjr) b2b33d9 Overhaul network activity toggle (Jonas Schnelli) 32efa79 Qt: Add GUI feedback and control of network activity state. (Jon Lund Steffensen) e38993b RPC: Add "togglenetwork" method to toggle network activity temporarily (Jon Lund Steffensen) 7c9a98a Allow network activity to be temporarily suspended. (Jon Lund Steffensen)
2016-11-09Replace CValidationState param in ProcessNewBlock with BlockCheckedMatt Corallo
2016-11-09Remove pfrom parameter from ProcessNewBlockMatt Corallo
This further decouples ProcessNewBlock from networking/peer logic.
2016-11-09Merge #9039: Various serialization simplifcations and optimizationsWladimir J. van der Laan
d59a518 Use fixed preallocation instead of costly GetSerializeSize (Pieter Wuille) 25a211a Add optimized CSizeComputer serializers (Pieter Wuille) a2929a2 Make CSerAction's ForRead() constexpr (Pieter Wuille) a603925 Avoid -Wshadow errors (Pieter Wuille) 5284721 Get rid of nType and nVersion (Pieter Wuille) 657e05a Make GetSerializeSize a wrapper on top of CSizeComputer (Pieter Wuille) fad9b66 Make nType and nVersion private and sometimes const (Pieter Wuille) c2c5d42 Make streams' read and write return void (Pieter Wuille) 50e8a9c Remove unused ReadVersion and WriteVersion (Pieter Wuille)
2016-11-08Merge #9095: test: Fix test_random includesJonas Schnelli
fa8278e test: Fix test_random includes (MarcoFalke)
2016-11-07Merge #9026: Fix handling of invalid compact blocksPieter Wuille
d4833ff Bump the protocol version to distinguish new banning behavior. (Suhas Daftuar) 88c3549 Fix compact block handling to not ban if block is invalid (Suhas Daftuar) c93beac [qa] Test that invalid compactblocks don't result in ban (Suhas Daftuar)
2016-11-08tx_valid: re-order inputs to how they are encodedDaniel Cousens
2016-11-07Get rid of nType and nVersionPieter Wuille
Remove the nType and nVersion as parameters to all serialization methods and functions. There is only one place where it's read and has an impact (in CAddress), and even there it does not impact any of the recursively invoked serializers. Instead, the few places that need nType or nVersion are changed to read it directly from the stream object, through GetType() and GetVersion() methods which are added to all stream classes.
2016-11-07Make GetSerializeSize a wrapper on top of CSizeComputerPieter Wuille
Given that in default GetSerializeSize implementations created by ADD_SERIALIZE_METHODS we're already using CSizeComputer(), get rid of the specialized GetSerializeSize methods everywhere, and just use CSizeComputer. This removes a lot of code which isn't actually used anywhere. For CCompactSize and CVarInt this actually removes a more efficient size computing algorithm, which is brought back in a later commit.
2016-11-07test: Fix test_random includesMarcoFalke
2016-11-07Merge #8976: libconsensus: Add input validation of flagsWladimir J. van der Laan
5ca8ef2 libconsensus: Add input validation of flags (Wladimir J. van der Laan)
2016-11-07Merge #7730: Remove priority estimationWladimir J. van der Laan
0bd581a add release notes for removal of priority estimation (Alex Morcos) b2322e0 Remove priority estimation (Alex Morcos)
2016-11-07Remove priority estimationAlex Morcos
2016-11-07Merge #8675: Make copyright header lines uniformWladimir J. van der Laan
4b04e32 [copyright] copyright header style uniform (isle2983)
2016-11-07Merge #8708: net: have CConnman handle message sendingWladimir J. van der Laan
9027680 net: handle version push in InitializeNode (Cory Fields) 7588b85 net: construct CNodeStates in place (Cory Fields) 440f1d3 net: remove now-unused ssSend and Fuzz (Cory Fields) 5c2169c drop the optimistic write counter hack (Cory Fields) ea33268 net: switch all callers to connman for pushing messages (Cory Fields) 3e32cd0 connman is in charge of pushing messages (Cory Fields) b98c14c serialization: teach serializers variadics (Cory Fields)
2016-11-07Merge #9070: Lockedpool fixesWladimir J. van der Laan
b3ddc5e LockedPool: avoid quadratic-time allocation (Kaz Wesley) 0b59f80 LockedPool: fix explosion for illegal-sized alloc (Kaz Wesley) 21b8f3d LockedPool: test handling of invalid allocations (Kaz Wesley)
2016-11-06[copyright] copyright header style uniformisle2983
Three categories of modifications: 1) 1 instance of 'The Bitcoin Core developers \n', 1 instance of 'the Bitcoin Core developers\n', 3 instances of 'Bitcoin Core Developers\n', and 12 instances of 'The Bitcoin developers\n' are made uniform with the 443 instances of 'The Bitcoin Core developers\n' 2) 3 instances of 'BitPay, Inc\.\n' are made uniform with the other 6 instances of 'BitPay Inc\.\n' 3) 4 instances where there was no '(c)' between the 'Copyright' and the year where it deviates from the style of the local directory.
2016-11-04Allow bitcoin-tx to parse partial transactionsjnewbery
Restore pre V0.13.1 functionality to bitcoin-tx and allow it to parse 0-input partial transactions.
2016-11-04Merge #9069: Clean up bctest.py and bitcoin-util-test.pyWladimir J. van der Laan
2b175d4 Clean up bctest.py and bitcoin-util-test.py (John Newbery)
2016-11-03net: handle version push in InitializeNodeCory Fields
2016-11-03connman is in charge of pushing messagesCory Fields
The changes here are dense and subtle, but hopefully all is more explicit than before. - CConnman is now in charge of sending data rather than the nodes themselves. This is necessary because many decisions need to be made with all nodes in mind, and a model that requires the nodes calling up to their manager quickly turns to spaghetti. - The per-node-serializer (ssSend) has been replaced with a (quasi-)const send-version. Since the send version for serialization can only change once per connection, we now explicitly tag messages with INIT_PROTO_VERSION if they are sent before the handshake. With this done, there's no need to lock for access to nSendVersion. Also, a new stream is used for each message, so there's no need to lock during the serialization process. - This takes care of accounting for optimistic sends, so the nOptimisticBytesWritten hack can be removed. - -dropmessagestest and -fuzzmessagestest have not been preserved, as I suspect they haven't been used in years.
2016-11-03serialization: teach serializers variadicsCory Fields
Also add a variadic CDataStream ctor for ease-of-use.
2016-11-03Fix compact block handling to not ban if block is invalidSuhas Daftuar
2016-11-03Clean up bctest.py and bitcoin-util-test.pyJohn Newbery
- remove newlines - change tabs for spaces, to align with convention in other py files - add comments - add 'Bitcoin Core Developers' copyright notice
2016-11-03Merge #9050: net: make a few values immutable, and use deterministic ↵Wladimir J. van der Laan
randomness for the localnonce 59ac5c5 net: Use deterministic randomness for CNode's nonce, and make it const (Cory Fields) aff6584 net: constify a few CNode vars to indicate that they're threadsafe (Cory Fields)
2016-11-03Merge #9053: IBD using chainwork instead of height and not using header ↵Pieter Wuille
timestamps e141beb IsInitialBlockDownload no longer uses header-only timestamps. (Gregory Maxwell) 2082b55 Remove GetTotalBlocksEstimate and checkpoint tests that test nothing. (Gregory Maxwell) fd46136 IBD check uses minimumchain work instead of checkpoints. (Gregory Maxwell)
2016-11-02LockedPool: avoid quadratic-time allocationKaz Wesley
Use separate maps for used/free chunks to avoid linear scan through alloced chunks for each alloc.
2016-11-02Merge #9065: Merge `doc/unit-tests.md` into `src/test/README.md`MarcoFalke
eedc461 Merge `doc/unit-tests.md` into `src/test/README.md` (Wladimir J. van der Laan)
2016-11-02LockedPool: test handling of invalid allocationsKaz Wesley
(Currently fails due to bug)
2016-11-02Merge #9066: tests: Remove variable unused after refactoringWladimir J. van der Laan
f91afe9 trivial: Remove variable unused after refactoring (Daniel Kraft)
2016-11-02trivial: Remove variable unused after refactoringDaniel Kraft
Remove a variable that is now unused after the recent refactoring (in 51f278329d43398428d60f5986f8d29a2041d28d) but has not been cleaned up so far.
2016-11-02Add logging to bitcoin-util-test.pyjnewbery
- Use the python standard logging library - Run all tests and report all failing test-cases (rather than stop after one test case fails) - If output is different from expected output, log a contextual diff.
2016-11-02Merge `doc/unit-tests.md` into `src/test/README.md`Wladimir J. van der Laan
Refer to the right file in the top-level README.md. Having only one file with test documentation saves some confusion about where things are documented.
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-11-02Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.Gregory Maxwell
GetTotalBlocksEstimate is no longer used and it was the only thing the checkpoint tests were testing. Since checkpoints are on their way out it makes more sense to remove the test file than to cook up a new pointless test.
2016-10-31net: Use deterministic randomness for CNode's nonce, and make it constCory Fields
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-24RPC/Net: Use boolean consistently for networkactive, and remove from getinfoLuke Dashjr
2016-10-24Overhaul network activity toggleJonas Schnelli
- Rename RPC command "togglenetwork" to "setnetworkactive (true|false)" - Add simple test case - GUI toggle added to connections icon in statusbar
2016-10-21Return shared_ptr<CTransaction> from mempool removesPieter Wuille
2016-10-21Make removed and conflicted arguments optional to removePieter Wuille
2016-10-20libconsensus: Add input validation of flagsWladimir J. van der Laan
Makes it an error to use flags that have not been defined on the libconsensus API. There has been some confusion as to what pass to libconsensus, and (combined with mention in the release notes) this should clear it up. Using undocumented flags is a risk because their meaning, and what combinations are allowed, changes from release to release. E.g. it is no longer possible to pass (CLEANSTACK | P2SH) without running into an assertion after the segwit changes.
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)