aboutsummaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | | | | | | | | | | | Remove fNetworkNode.Gregory Maxwell2016-11-273-7/+3
| |/ / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matt pointed out to me that this appeared to be doing nothing (except involving itself in data races).
* | | | | | | | | | | | | | | | | Merge #9244: Trivial refactor: Remove extern keyword from function declarationsPieter Wuille2016-11-301-11/+11
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 446a8f9 Trivial refactor: Remove extern keyword from function declarations, as they are extern by default. (Karl-Johan Alm)
| * | | | | | | | | | | | | | | | | Trivial refactor: Remove extern keyword from function declarations, as they ↵Karl-Johan Alm2016-11-301-11/+11
| | |_|_|/ / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | are extern by default.
* | | | | | | | | | | | | | | | | Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir ↵Pieter Wuille2016-11-306-35/+121
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|_|_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lock errors deec83f init: Get rid of fServer flag (Wladimir J. van der Laan) 16ca0bf init: Try to aquire datadir lock before and after daemonization (Wladimir J. van der Laan) 0cc8b6b init: Split up AppInit2 into multiple phases (Wladimir J. van der Laan)
| * | | | | | | | | | | | | | | | init: Get rid of fServer flagWladimir J. van der Laan2016-11-293-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no need to store this flag globally, the variable is only used inside the initialization process. Thanks to Alex Morcos for the idea.
| * | | | | | | | | | | | | | | | init: Try to aquire datadir lock before and after daemonizationWladimir J. van der Laan2016-11-291-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before daemonization, just probe the data directory lock and print an early error message if possible. After daemonization get the data directory lock again and hold on to it until exit This creates a slight window for a race condition to happen, however this condition is harmless: it will at most make us exit without printing a message to console. $ src/bitcoind -testnet -daemon Bitcoin server starting $ src/bitcoind -testnet -daemon Error: Cannot obtain a lock on data directory /home/orion/.bitcoin/testnet3. Bitcoin Core is probably already running.
| * | | | | | | | | | | | | | | | init: Split up AppInit2 into multiple phasesWladimir J. van der Laan2016-11-294-21/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows doing some of the steps before e.g. daemonization and some fater.
* | | | | | | | | | | | | | | | | Merge #9234: torcontrol: Explicitly request RSA1024 private keyWladimir J. van der Laan2016-11-301-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7d3b627 torcontrol: Explicitly request RSA1024 private key (Wladimir J. van der Laan)
| * | | | | | | | | | | | | | | | torcontrol: Explicitly request RSA1024 private keyWladimir J. van der Laan2016-11-281-1/+1
| | |/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When generating a new service key, explicitly request a RSA1024 one. The bitcoin P2P protocol has no support for the longer hidden service names that will come with ed25519 keys, until it does, we depend on the old hidden service type so make this explicit. See #9214.
* | | | | | | | | | | | | | | | Merge #9202: bench: Add support for measuring CPU cyclesWladimir J. van der Laan2016-11-295-5/+121
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 3532818 bench: Add support for measuring CPU cycles (Wladimir J. van der Laan)
| * | | | | | | | | | | | | | | | bench: Add support for measuring CPU cyclesWladimir J. van der Laan2016-11-225-5/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds cycle min/max/avg to the statistics. Supported on x86 and x86_64 (natively through rdtsc), as well as Linux (perf syscall).
* | | | | | | | | | | | | | | | | Merge #9225: Fix some benign racesWladimir J. van der Laan2016-11-295-36/+32
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dfed983 Fix unlocked access to vNodes.size() (Matt Corallo) 3033522 Remove double brackets in addrman (Matt Corallo) dbfaade Fix AddrMan locking (Matt Corallo) 047ea10 Make fImporting an std::atomic (Matt Corallo) 42071ca Make fDisconnect an std::atomic (Matt Corallo)
| * | | | | | | | | | | | | | | | | Fix unlocked access to vNodes.size()Matt Corallo2016-11-261-2/+7
| | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | Remove double brackets in addrmanMatt Corallo2016-11-261-18/+12
| | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | Fix AddrMan lockingMatt Corallo2016-11-261-13/+10
| | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | Make fImporting an std::atomicMatt Corallo2016-11-262-2/+2
| | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | Make fDisconnect an std::atomicMatt Corallo2016-11-251-1/+1
| | |_|_|_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge #9224: Prevent FD_SETSIZE error building on OpenBSDWladimir J. van der Laan2016-11-291-0/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 498a1d7 Include select.h when WIN32 is not defined (Ivo van der Sangen)
| * | | | | | | | | | | | | | | | | Include select.h when WIN32 is not definedIvo van der Sangen2016-11-291-0/+1
| | |_|/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | |
* / | | | | | | | | | | | | | | | Fix some typosfsb40002016-11-288-8/+8
|/ / / / / / / / / / / / / / / /
* | | | | | | | | | | | | | | | Merge #9128: net: Decouple CConnman and message serializationPieter Wuille2016-11-257-152/+308
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | c7be56d net: push only raw data into CConnman (Cory Fields) 2ec935d net: add CVectorWriter and CNetMsgMaker (Cory Fields) b7695c2 net: No need to check individually for disconnection anymore (Cory Fields) fedea8a net: don't send any messages before handshake or after requested disconnect (Cory Fields) d74e352 net: Set feelers to disconnect at the end of the version message (Cory Fields)
| * | | | | | | | | | | | | | | | net: push only raw data into CConnmanCory Fields2016-11-253-119/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes one of the last major layer violations in the networking stack. The network side is no longer in charge of message serialization, so it is now decoupled from Bitcoin structures. Only the header is serialized and attached to the payload.
| * | | | | | | | | | | | | | | | net: add CVectorWriter and CNetMsgMakerCory Fields2016-11-255-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | CVectorWriter is useful for overwriting or appending an existing byte vector. CNetMsgMaker is a shortcut for creating messages on-the-fly which are suitable for pushing to CConnman.
| * | | | | | | | | | | | | | | | net: No need to check individually for disconnection anymoreCory Fields2016-11-251-7/+7
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | net: don't send any messages before handshake or after requested disconnectCory Fields2016-11-231-21/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also, send reject messages earlier in SendMessages(), so that disconnections are processed earlier. These changes combined should ensure that no message is ever sent after fDisconnect is set.
| * | | | | | | | | | | | | | | | net: Set feelers to disconnect at the end of the version messageCory Fields2016-11-231-6/+6
| | |_|_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we're not relying on messages going out after fDisconnect has been set. This should not cause any real behavioral changes, though feelers should arguably disconnect earlier in the process. That can be addressed in a later functional change.
* | | | | | | | | | | | | | | | Merge #9220: Refactor: Stop using namespace std (bitcoin-cli/-tx).MarcoFalke2016-11-252-112/+108
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2f2625a Removed using namespace std from bitcoin-cli/-tx and added std:: in appropriate places. (Karl-Johan Alm)
| * | | | | | | | | | | | | | | | Removed using namespace std from bitcoin-cli/-tx and added std:: in ↵Karl-Johan Alm2016-11-252-112/+108
| | |/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | appropriate places.
* | | | | | | | | | | | | | | | Merge #9100: tx_valid: re-order inputs to how they are encodedMarcoFalke2016-11-251-9/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5262a15 tx_valid: re-order inputs to how they are encoded (Daniel Cousens)
| * | | | | | | | | | | | | | | | tx_valid: re-order inputs to how they are encodedDaniel Cousens2016-11-081-9/+9
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge #9189: Always add default_witness_commitment with GBT client supportWladimir J. van der Laan2016-11-253-9/+5
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 95f4a03 [qa] Test getblocktemplate default_witness_commitment (Suhas Daftuar) ad04d1c Always add default_witness_commitment with GBT client support (Pieter Wuille)
| * | | | | | | | | | | | | | | | Always add default_witness_commitment with GBT client supportPieter Wuille2016-11-213-9/+5
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge #9216: Doc: Fix copypasted commentMarcoFalke2016-11-241-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f26da35 Fix copypasted comment. (Pavel Janík)
| * | | | | | | | | | | | | | | | | Fix copypasted comment.Pavel Janík2016-11-241-1/+1
| | |_|/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Correct help output for waitfor RPC commandsfanquake2016-11-241-10/+10
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge #9190: qt: Plug many memory leaksWladimir J. van der Laan2016-11-2423-74/+102
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ed998ea qt: Avoid OpenSSL certstore-related memory leak (Wladimir J. van der Laan) 5204598 qt: Avoid shutdownwindow-related memory leak (Wladimir J. van der Laan) e4f126a qt: Avoid splash-screen related memory leak (Wladimir J. van der Laan) 693384e qt: Prevent thread/memory leak on exiting RPCConsole (Wladimir J. van der Laan) 47db075 qt: Plug many memory leaks (Wladimir J. van der Laan)
| * | | | | | | | | | | | | | | | qt: Avoid OpenSSL certstore-related memory leakWladimir J. van der Laan2016-11-232-23/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Correctly manage the X509 and X509_STORE objects lifetime.
| * | | | | | | | | | | | | | | | qt: Avoid shutdownwindow-related memory leakWladimir J. van der Laan2016-11-233-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Store a reference to the shutdown window on BitcoinApplication, so that it will be deleted when exiting the main loop.
| * | | | | | | | | | | | | | | | qt: Avoid splash-screen related memory leakWladimir J. van der Laan2016-11-232-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make splash screen queue its own deletion when it receives the finished command, instead of relying on WA_DeleteOnClose which doesn't work under these circumstances.
| * | | | | | | | | | | | | | | | qt: Prevent thread/memory leak on exiting RPCConsoleWladimir J. van der Laan2016-11-234-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make ownership of the QThread object clear, so that the RPCConsole can wait for the executor thread to quit before shutdown is called. This increases overall thread safety, and prevents some objects from leaking on exit.
| * | | | | | | | | | | | | | | | qt: Plug many memory leaksWladimir J. van der Laan2016-11-2316-26/+40
| | |_|_|_|/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | None of these are very serious, and are leaks in objects that are created at most one time. In most cases this means properly using the QObject parent hierarchy, except for BanTablePriv/PeerTablePriv which are not QObject, so use a std::unique_ptr instead.
* | | | | | | | | | | | | | | | Merge #8930: Move orphan processing to ActivateBestChainPieter Wuille2016-11-232-20/+29
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | d2b88f9 Move orphan-conflict removal from main logic into a callback (Matt Corallo) 97e2802 Erase orphans per-transaction instead of per-block (Matt Corallo) ec4525c Move orphan processing to ActivateBestChain (Matt Corallo)
| * | | | | | | | | | | | | | | | Move orphan-conflict removal from main logic into a callbackMatt Corallo2016-11-232-28/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes the orphan map a part of net-processing logic instead of main logic.
| * | | | | | | | | | | | | | | | Erase orphans per-transaction instead of per-blockMatt Corallo2016-11-171-8/+9
| | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | Move orphan processing to ActivateBestChainMatt Corallo2016-11-171-20/+27
| |/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This further decouples "main" and "net" processing logic by moving orphan processing out of the chain-connecting cs_main lock and into its own cs_main lock, beside all of the other chain callbacks. Once further decoupling of net and main processing logic occurs, orphan handing should move to its own lock, out of cs_main. Note that this will introduce a race if there are any cases where we assume the orphan map to be consistent with the current chain tip, however I am confident there is no such case (ATMP will fail without DoS score in all such cases).
* | | | | | | | | | | | | | | | Merge #9199: Always drop the least preferred HB peer when adding a new one.Pieter Wuille2016-11-231-3/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ca8549d Always drop the least preferred HB peer when adding a new one. (Gregory Maxwell)
| * | | | | | | | | | | | | | | | Always drop the least preferred HB peer when adding a new one.Gregory Maxwell2016-11-221-3/+2
| | |/ / / / / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a BIP152 HB-mode peer is in the least preferred position and disconnects, they will not be by ForNode on the next loop. They will continue to sit in that position and prevent deactivating HB mode for peers that are still connected. There is no reason for them to stay in the list if already gone, so drop the first element unconditionally if there are too many. Fixes issue #9163.
* | | | | | | | | | | | | | | | Merge #9204: Clarify CreateTransaction error messagesWladimir J. van der Laan2016-11-231-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 918b126 fix CreateTransaction error messages (instagibbs)
| * | | | | | | | | | | | | | | | fix CreateTransaction error messagesinstagibbs2016-11-221-3/+3
| | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | Merge #9205: Minor change to comment for consistency.Wladimir J. van der Laan2016-11-231-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | f004e67 Minor change to comment above new NODE_WITNESS service flag to keep it consitent with existing comment structure. Helps with readability. (Greg Walker)