aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Merge #9069: Clean up bctest.py and bitcoin-util-test.pyWladimir J. van der Laan2016-11-042-81/+101
|\ | | | | | | 2b175d4 Clean up bctest.py and bitcoin-util-test.py (John Newbery)
| * Clean up bctest.py and bitcoin-util-test.pyJohn Newbery2016-11-032-81/+101
| | | | | | | | | | | | | | - remove newlines - change tabs for spaces, to align with convention in other py files - add comments - add 'Bitcoin Core Developers' copyright notice
* | Merge #9073: Trivial: Add common failure cases for rpc server connection failureWladimir J. van der Laan2016-11-031-1/+1
|\ \ | | | | | | | | | 8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
| * | Add common failure cases for rpc server connection failureinstagibbs2016-11-031-1/+1
| | |
* | | Merge #8969: Decouple peer-processing-logic from block-connection-logic (#2)Wladimir J. van der Laan2016-11-033-29/+49
|\ \ \ | |/ / |/| | | | | | | | | | | | | | | | | f5b960b Move nTimeBestReceived updating into net processing code (Matt Corallo) d8670fb Move all calls to CheckBlockIndex out of net-processing logic (Matt Corallo) d6ea737 Remove network state wipe from UnloadBlockIndex. (Matt Corallo) fc0c24f Move MarkBlockAsReceived out of ProcessNewMessage (Matt Corallo) 65f35eb Move FlushStateToDisk call out of ProcessMessages::TX into ATMP (Matt Corallo)
| * | Move nTimeBestReceived updating into net processing codeMatt Corallo2016-10-311-2/+3
| | |
| * | Move all calls to CheckBlockIndex out of net-processing logicMatt Corallo2016-10-311-4/+2
| | | | | | | | | | | | | | | | | | | | | This will result in many more calls to CheckBlockIndex when connecting a list of headers (eg in ::HEADERS messages processing) but its only enabled in debug mode, and that should mostly just be during IBD, so it should be OK.
| * | Remove network state wipe from UnloadBlockIndex.Matt Corallo2016-10-313-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UnloadBlockIndex is only used during init if we end up reindexing to clear our block state so that we can start over. However, at that time no connections have been brought up as CConnman hasn't been started yet, so all of the network processing state logic is empty when its called. Additionally, the initialization of the recentRejects set is moved to InitPeerLogic.
| * | Move MarkBlockAsReceived out of ProcessNewMessageMatt Corallo2016-10-311-5/+18
| | |
| * | Move FlushStateToDisk call out of ProcessMessages::TX into ATMPMatt Corallo2016-10-311-8/+13
| | |
* | | Merge #9050: net: make a few values immutable, and use deterministic ↵Wladimir J. van der Laan2016-11-034-23/+33
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | net: Use deterministic randomness for CNode's nonce, and make it constCory Fields2016-10-314-13/+24
| | | |
| * | | net: constify a few CNode vars to indicate that they're threadsafeCory Fields2016-10-312-10/+9
| | | |
* | | | Merge #9071: Declare wallet.h functions inlineWladimir J. van der Laan2016-11-031-2/+2
|\ \ \ \ | | | | | | | | | | | | | | | 2ca882a Declare wallet.h functions inline (Pieter Wuille)
| * | | | Declare wallet.h functions inlinePieter Wuille2016-11-021-2/+2
| | | | |
* | | | | Merge #9053: IBD using chainwork instead of height and not using header ↵Pieter Wuille2016-11-037-48/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | | IsInitialBlockDownload no longer uses header-only timestamps.Gregory Maxwell2016-11-021-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids a corner case (mostly visible on testnet) where bogus headers can keep nodes in IsInitialBlockDownload.
| * | | | | Remove GetTotalBlocksEstimate and checkpoint tests that test nothing.Gregory Maxwell2016-11-024-41/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | IBD check uses minimumchain work instead of checkpoints.Gregory Maxwell2016-11-023-2/+15
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This introduces a 'minimum chain work' chainparam which is intended to be the known amount of work in the chain for the network at the time of software release. If you don't have this much work, you're not yet caught up. This is used instead of the count of blocks test from checkpoints. This criteria is trivial to keep updated as there is no element of subjectivity, trust, or position dependence to it. It is also a more reliable metric of sync status than a block count.
* | | | | Merge #9036: wallet: Change default confirm target from 2 to 6Pieter Wuille2016-11-021-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | 0fdf810 wallet: Change default confirm target from 2 to 6 (Wladimir J. van der Laan)
| * | | | wallet: Change default confirm target from 2 to 6Wladimir J. van der Laan2016-10-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent discussion (in IRC meetings, and e.g. #8989) has shown a preference for the default confirm target for smartfees to be 6 instead of 2, to avoid overpaying fees for questionable gain. 6 is also a compromise between the GUI's pre-#8989 value of 25 and the bitcoind `-txconfirmtarget` default of 2. These were unified in #8989, but this has made the (overly expensive) default of 2 as GUI default.
* | | | | Merge #9065: Merge `doc/unit-tests.md` into `src/test/README.md`MarcoFalke2016-11-021-13/+34
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | eedc461 Merge `doc/unit-tests.md` into `src/test/README.md` (Wladimir J. van der Laan)
| * | | | Merge `doc/unit-tests.md` into `src/test/README.md`Wladimir J. van der Laan2016-11-021-13/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge #8977: [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush ↵Wladimir J. van der Laan2016-11-023-11/+19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | thread) cab1da7 [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
| * | | | | [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)Jonas Schnelli2016-10-203-11/+19
| | | | | |
* | | | | | Merge #9013: Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB()Wladimir J. van der Laan2016-11-023-6/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
| * | | | | | Explicitly pass const CChainParams& to LoadBlockIndexDB()Geoffrey Tsui2016-10-253-6/+5
| | | | | | |
* | | | | | | Merge #9042: [rpc] ParseHash: Fail when length is not 64Wladimir J. van der Laan2016-11-021-0/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | fa32619 [rpc] ParseHash: Fail when length is not 64 (MarcoFalke)
| * | | | | | | [rpc] ParseHash: Fail when length is not 64MarcoFalke2016-10-311-0/+2
| | |_|_|/ / / | |/| | | | |
* | | | | | | Merge #9066: tests: Remove variable unused after refactoringWladimir J. van der Laan2016-11-021-1/+0
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | f91afe9 trivial: Remove variable unused after refactoring (Daniel Kraft)
| * | | | | | | trivial: Remove variable unused after refactoringDaniel Kraft2016-11-021-1/+0
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove a variable that is now unused after the recent refactoring (in 51f278329d43398428d60f5986f8d29a2041d28d) but has not been cleaned up so far.
* / | | | | | Add logging to bitcoin-util-test.pyjnewbery2016-11-022-24/+54
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | | | | | Merge #8828: Move CWalletDB::ReorderTransactions to CWalletWladimir J. van der Laan2016-11-023-80/+74
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 86029e7 Move CWalletDB::ReorderTransactions to CWallet (Patrick Strateman)
| * | | | | | Move CWalletDB::ReorderTransactions to CWalletPatrick Strateman2016-10-303-80/+74
| |/ / / / /
* | | | | | Merge #9060: trivial: fix bloom filter init to isEmpty = trueWladimir J. van der Laan2016-11-021-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | cccf73d trivial: fix bloom filter init to isEmpty = true (Robert McLaughlin)
| * | | | | | trivial: fix bloom filter init to isEmpty = trueRobert McLaughlin2016-11-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes newly initialized bloom filters being constructed with isEmpty(false), which still works but loses the possible speedup when checking for key membership in an empty filter.
* | | | | | | Do not shadow variable, use deprecated MAP_ANON if MAP_ANONYMOUS is not defined.Pavel Janík2016-11-021-3/+10
| | | | | | |
* | | | | | | Merge #8753: Locked memory managerWladimir J. van der Laan2016-11-0215-410/+966
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
| * | | | | | | bench: Add benchmark for lockedpool allocation/deallocationWladimir J. van der Laan2016-10-272-1/+49
| | | | | | | |
| * | | | | | | rpc: Add `getmemoryinfo` callWladimir J. van der Laan2016-10-271-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``` getmemoryinfo Returns an object containing information about memory usage. Result: { "locked": { (json object) Information about locked memory manager "used": xxxxx, (numeric) Number of bytes used "free": xxxxx, (numeric) Number of bytes available in current arenas "total": xxxxxxx, (numeric) Total number of bytes managed "locked": xxxxxx, (numeric) Amount of bytes that succeeded locking. If this number is smaller than total, locking pages failed at some point and key data could be swapped to disk. } } Examples: > bitcoin-cli getmemoryinfo > curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getmemoryinfo", "params": [] }' -H 'content-type: text/plain;' http://127.0.0.1:8332/ ```
| * | | | | | | support: Add LockedPoolWladimir J. van der Laan2016-10-277-328/+832
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | | | | | | wallet: Get rid of LockObject and UnlockObject calls in key.hWladimir J. van der Laan2016-10-193-55/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replace these with vectors allocated from the secure allocator. This avoids mlock syscall churn on stack pages, as well as makes it possible to get rid of these functions. Please review this commit and the previous one carefully that no `sizeof(vectortype)` remains in the memcpys and memcmps usage (ick!), and `.data()` or `&vec[x]` is used as appropriate instead of &vec.
| * | | | | | | wallet: Change CCrypter to use vectors with secure allocatorWladimir J. van der Laan2016-10-193-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change CCrypter to use vectors with secure allocator instead of buffers on in the object itself which will end up on the stack. This avoids having to call LockedPageManager to lock stack memory pages to prevent the memory from being swapped to disk. This is wasteful.
* | | | | | | | Merge #9032: test: Add format-dependent comparison to bctestWladimir J. van der Laan2016-11-021-3/+27
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c5cd9d test: Add format-dependent comparison to bctest (Wladimir J. van der Laan)
| * | | | | | | | test: Add format-dependent comparison to bctestWladimir J. van der Laan2016-10-281-3/+27
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | | Merge #8448: Store mempool and prioritization data to diskWladimir J. van der Laan2016-11-025-7/+146
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 582068a Add mempool.dat to doc/files.md (Pieter Wuille) 3f78562 Add DumpMempool and LoadMempool (Pieter Wuille) ced7c94 Add AcceptToMemoryPoolWithTime function (Pieter Wuille) c3efb58 Add feedelta to TxMempoolInfo (Pieter Wuille)
| * | | | | | | Add DumpMempool and LoadMempoolPieter Wuille2016-10-313-0/+122
| | | | | | | |
| * | | | | | | Add AcceptToMemoryPoolWithTime functionPieter Wuille2016-10-302-5/+15
| | | | | | | |
| * | | | | | | Add feedelta to TxMempoolInfoPieter Wuille2016-10-302-2/+9
| | |_|/ / / / | |/| | | | |
* | | | | | | Merge #9043: [qt] Return useful error message on ATMP failureJonas Schnelli2016-11-013-4/+8
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | | | | | | | | 3333e5a [qt] Return useful error message on ATMP failure (MarcoFalke)