aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
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-04Remove unused CTxOut::GetHash()Matt Corallo
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-03net: construct CNodeStates in placeCory Fields
2016-11-03net: remove now-unused ssSend and FuzzCory Fields
2016-11-03drop the optimistic write counter hackCory Fields
This is now handled properly in realtime.
2016-11-03net: switch all callers to connman for pushing messagesCory Fields
Drop all of the old stuff.
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-03Merge #9073: Trivial: Add common failure cases for rpc server connection failureWladimir J. van der Laan
8f329f9 Add common failure cases for rpc server connection failure (instagibbs)
2016-11-03Add common failure cases for rpc server connection failureinstagibbs
2016-11-03Merge #8969: Decouple peer-processing-logic from block-connection-logic (#2)Wladimir J. van der Laan
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)
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 #9071: Declare wallet.h functions inlineWladimir J. van der Laan
2ca882a Declare wallet.h functions inline (Pieter Wuille)
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-02Merge #9036: wallet: Change default confirm target from 2 to 6Pieter Wuille
0fdf810 wallet: Change default confirm target from 2 to 6 (Wladimir J. van der Laan)
2016-11-02Declare wallet.h functions inlinePieter Wuille
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: fix explosion for illegal-sized allocKaz Wesley
Check for unreasonable alloc size in LockedPool rather than lancing through new Arenas until we improbably find one worthy of the quixotic request or the system can support no more Arenas.
2016-11-02LockedPool: test handling of invalid allocationsKaz Wesley
(Currently fails due to bug)
2016-11-02Merge #8977: [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush ↵Wladimir J. van der Laan
thread) cab1da7 [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
2016-11-02Merge #9013: Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB()Wladimir J. van der Laan
d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
2016-11-02Merge #9042: [rpc] ParseHash: Fail when length is not 64Wladimir J. van der Laan
fa32619 [rpc] ParseHash: Fail when length is not 64 (MarcoFalke)
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 #8828: Move CWalletDB::ReorderTransactions to CWalletWladimir J. van der Laan
86029e7 Move CWalletDB::ReorderTransactions to CWallet (Patrick Strateman)
2016-11-02Merge #9060: trivial: fix bloom filter init to isEmpty = trueWladimir J. van der Laan
cccf73d trivial: fix bloom filter init to isEmpty = true (Robert McLaughlin)
2016-11-02Do not shadow variable, use deprecated MAP_ANON if MAP_ANONYMOUS is not defined.Pavel Janík
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-02Merge #9032: test: Add format-dependent comparison to bctestWladimir J. van der Laan
6c5cd9d test: Add format-dependent comparison to bctest (Wladimir J. van der Laan)
2016-11-02Merge #8448: Store mempool and prioritization data to diskWladimir J. van der Laan
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)
2016-11-02IsInitialBlockDownload no longer uses header-only timestamps.Gregory Maxwell
This avoids a corner case (mostly visible on testnet) where bogus headers can keep nodes in IsInitialBlockDownload.
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-11-02IBD check uses minimumchain work instead of checkpoints.Gregory Maxwell
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.
2016-11-01trivial: fix bloom filter init to isEmpty = trueRobert McLaughlin
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.
2016-11-01Merge #9043: [qt] Return useful error message on ATMP failureJonas Schnelli
3333e5a [qt] Return useful error message on ATMP failure (MarcoFalke)
2016-10-31net: Use deterministic randomness for CNode's nonce, and make it constCory Fields
2016-10-31net: constify a few CNode vars to indicate that they're threadsafeCory Fields
2016-10-31Move nTimeBestReceived updating into net processing codeMatt Corallo
2016-10-31Move all calls to CheckBlockIndex out of net-processing logicMatt Corallo
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.
2016-10-31Remove network state wipe from UnloadBlockIndex.Matt Corallo
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.
2016-10-31Move MarkBlockAsReceived out of ProcessNewMessageMatt Corallo
2016-10-31Move FlushStateToDisk call out of ProcessMessages::TX into ATMPMatt Corallo
2016-10-31[rpc] ParseHash: Fail when length is not 64MarcoFalke