Commit graph

1025 commits

Author SHA1 Message Date
Pieter Wuille a143b88dbd
Merge #9010: Split up AppInit2 into multiple phases, daemonize after datadir 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)
2016-11-30 16:11:14 -08:00
wodry 8a70a9da3d Improvement of documentation of command line parameter 'whitelist' 2016-11-30 21:40:21 +01:00
Wladimir J. van der Laan deec83fd2c init: Get rid of fServer flag
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.
2016-11-29 12:47:13 +01:00
Wladimir J. van der Laan 16ca0bfd28 init: Try to aquire datadir lock before and after daemonization
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.
2016-11-29 12:47:13 +01:00
Wladimir J. van der Laan 0cc8b6bc44 init: Split up AppInit2 into multiple phases
This allows doing some of the steps before e.g. daemonization and some
fater.
2016-11-29 12:47:13 +01:00
Wladimir J. van der Laan 40022fe5f2
Merge #9142: Move -salvagewallet, -zap(wtx) to where they belong
2e44893 Move -salvagewallet, -zap(wtx) to where they belong (Jonas Schnelli)
2016-11-23 07:18:24 +01:00
Jonas Schnelli 2e44893081
Move -salvagewallet, -zap(wtx) to where they belong 2016-11-12 10:25:34 +01:00
Alex Morcos 79f755db41 Unset fImporting for loading mempool 2016-11-11 09:33:16 -05:00
Wladimir J. van der Laan 3665483be7
Merge #8969: Decouple peer-processing-logic from block-connection-logic (#2)
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-03 16:31:32 +01:00
Wladimir J. van der Laan 6a1343f73b
Merge #8977: [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread)
cab1da7 [Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) (Jonas Schnelli)
2016-11-02 21:37:43 +01:00
Wladimir J. van der Laan c05db83488
Merge #9013: Trivial: Explicitly pass const CChainParams& to LoadBlockIndexDB()
d0b01f3 Explicitly pass const CChainParams& to LoadBlockIndexDB() (Geoffrey Tsui)
2016-11-02 21:09:27 +01:00
Matt Corallo d6ea737be1 Remove network state wipe from UnloadBlockIndex.
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-31 10:08:11 -04:00
Pieter Wuille 3f78562df5 Add DumpMempool and LoadMempool 2016-10-31 00:10:36 -07:00
Geoffrey Tsui d0b01f3a85 Explicitly pass const CChainParams& to LoadBlockIndexDB() 2016-10-25 22:35:26 +08:00
Gregory Maxwell 515e2642eb Make connect=0 disable automatic outbound connections.
Otherwise it just responds to this obvious bit of configuration by
 trying to connect to "0" in a loop.
2016-10-25 06:17:43 +00:00
Jonas Schnelli cab1da745b
[Wallet] Refactor wallet/init interaction (Reaccept wtx, flush thread) 2016-10-20 09:22:13 +02:00
Jorge Timón 6f2f639cdf
Chainparams: Trivial: In AppInit2(), s/Params()/chainparams/ 2016-10-19 19:01:10 +02:00
Wladimir J. van der Laan c587577356
Merge #8928: Fix init segfault where InitLoadWallet() calls ATMP before genesis
37aefff Fix init segfault where InitLoadWallet() calls ATMP before genesis (Matt Corallo)
2016-10-19 18:11:15 +02:00
Wladimir J. van der Laan 05998da5a7
Merge #8865: Decouple peer-processing-logic from block-connection-logic
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-18 22:48:51 +02:00
instagibbs b2e93a343e Add cmpctblock to debug help list 2016-10-17 16:44:57 +02:00
Matt Corallo 37aefff5fc Fix init segfault where InitLoadWallet() calls ATMP before genesis 2016-10-15 13:19:16 -04:00
Matt Corallo fef1010199 Use CValidationInterface from chain logic to notify peer logic
This adds a new CValidationInterface subclass, defined in main.h,
to receive notifications of UpdatedBlockTip and use that to push
blocks to peers, instead of doing it directly from
ActivateBestChain.
2016-10-04 13:49:44 -04:00
Jorge Timón 3450c18a12
Globals: Decouple GetConfigFile and ReadConfigFile from global mapArgs 2016-10-01 08:12:19 +02:00
Wladimir J. van der Laan fb24d7eeb4
Merge #8813: bitcoind: Daemonize using daemon(3)
a92bf4a bitcoind: Daemonize using daemon(3) (Matthew King)
2016-09-30 18:19:31 +02:00
MarcoFalke fa4bfb4819 [wallet, policy] ParameterInteraction: Don't allow 0 fee 2016-09-26 14:44:24 +02:00
Matthew King a92bf4af66 bitcoind: Daemonize using daemon(3)
Simplified version of #8278. Assumes that every OS that (a) is supported
by Bitcoin Core (b) supports daemonization has the `daemon()` function
in its C library.

- Removes the fallback path for operating systems that support
  daemonization but not `daemon()`. This prevents never-exercised code from
  ending up in the repository (see discussion here:
  https://github.com/bitcoin/bitcoin/pull/8278#issuecomment-242704745).

- Removes the windows-specific path. Windows doesn't support `daemon()`,
  so it don't support daemonization there, automatically.

Original code by Matthew King, adapted by Wladimir van der Laan.
2016-09-26 13:37:44 +02:00
MarcoFalke faef293cf3 [wallet] Add high transaction fee warnings 2016-09-26 01:11:27 +02:00
MarcoFalke fab91070d3 init: Get rid of fDisableWallet 2016-09-20 17:32:05 +02:00
Wladimir J. van der Laan 02ac669730
Merge #8760: [init] Get rid of some ENABLE_WALLET
faddd62 init: Get rid of some ENABLE_WALLET (MarcoFalke)
2016-09-20 12:45:46 +02:00
Wladimir J. van der Laan 047ded0b12
Merge #8688: Move static global randomizer seeds into CConnman
d9ff591 Move static global randomizer seeds into CConnman (Pieter Wuille)
2016-09-19 18:02:01 +02:00
Wladimir J. van der Laan f07424a671
Merge #8707: net: fix maxuploadtarget setting
f3552da net: fix maxuploadtarget setting (Cory Fields)
2016-09-19 16:46:50 +02:00
MarcoFalke faddd62518 init: Get rid of some ENABLE_WALLET 2016-09-19 16:14:18 +02:00
Pieter Wuille d9ff591d42 Move static global randomizer seeds into CConnman 2016-09-19 15:53:47 +02:00
Wladimir J. van der Laan a5b20edd3d
Merge #8494: [init, wallet] ParameterInteraction() iff wallet enabled
fa5d276 [init] ParameterInteraction() iff wallet enabled (MarcoFalke)
2016-09-19 11:38:16 +02:00
Cory Fields f3552da813 net: fix maxuploadtarget setting
This was broken by 63cafa6329.

Note that while this fixes the settings, it doesn't fix the actual usage of
-maxuploadtarget completely, as there is currently a bug in the
nOptimisticBytesWritten accounting that causes a delayed response if the target
is reached. That bug will be addressed separately.
2016-09-14 13:14:04 -04:00
Cory Fields 36fa01f217 net: only delete CConnman if it's been created
In the case of (for example) an already-running bitcoind, the shutdown sequence
begins before CConnman has been created, leading to a null-pointer dereference
when g_connman->Stop() is called.

Instead, Just let the CConnman dtor take care of stopping.
2016-09-13 22:43:23 -04:00
Wladimir J. van der Laan 6423116741
Merge #8085: p2p: Begin encapsulation
0103c5b net: move MAX_FEELER_CONNECTIONS into connman (Cory Fields)
e700cd0 Convert ForEachNode* functions to take a templated function argument rather than a std::function to eliminate std::function overhead (Jeremy Rubin)
d1a2295 Made the ForEachNode* functions in src/net.cpp more pragmatic and self documenting (Jeremy Rubin)
98591c5 net: move vNodesDisconnected into CConnman (Cory Fields)
fa2f8bc net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options (Cory Fields)
a19553b net: Introduce CConnection::Options to avoid passing so many params (Cory Fields)
bafa5fc net: Drop StartNode/StopNode and use CConnman directly (Cory Fields)
e81a602 net: pass CClientUIInterface into CConnman (Cory Fields)
f60b905 net: Pass best block known height into CConnman (Cory Fields)
fdf69ff net: move max/max-outbound to CConnman (Cory Fields)
8a59369 net: move semOutbound to CConnman (Cory Fields)
bd72937 net: move nLocalServices/nRelevantServices to CConnman (Cory Fields)
be9c796 net: move SendBufferSize/ReceiveFloodSize to CConnman (Cory Fields)
63cafa6 net: move send/recv statistics to CConnman (Cory Fields)
adf5d4c net: SocketSendData returns written size (Cory Fields)
ee44fa9 net: move messageHandlerCondition to CConnman (Cory Fields)
960cf2e net: move nLocalHostNonce to CConnman (Cory Fields)
551e088 net: move nLastNodeId to CConnman (Cory Fields)
6c19d92 net: move whitelist functions into CConnman (Cory Fields)
53347f0 net: create generic functor accessors and move vNodes to CConnman (Cory Fields)
c0569c7 net: Add most functions needed for vNodes to CConnman (Cory Fields)
8ae2dac net: move added node functions to CConnman (Cory Fields)
502dd3a net: Add oneshot functions to CConnman (Cory Fields)
a0f3d3c net: move ban and addrman functions into CConnman (Cory Fields)
aaf018e net: handle nodesignals in CConnman (Cory Fields)
b1a5f43 net: move OpenNetworkConnection into CConnman (Cory Fields)
02137f1 net: Move socket binding into CConnman (Cory Fields)
5b446dd net: Pass CConnection to wallet rather than using the global (Cory Fields)
8d58c4d net: Pass CConnman around as needed (Cory Fields)
d7349ca net: Add rpc error for missing/disabled p2p functionality (Cory Fields)
cd16f48 net: Create CConnman to encapsulate p2p connections (Cory Fields)
d93b14d net: move CBanDB and CAddrDB out of net.h/cpp (Cory Fields)
531214f gui: add NodeID to the peer table (Cory Fields)
2016-09-09 11:52:22 +02:00
Cory Fields 0103c5b90f net: move MAX_FEELER_CONNECTIONS into connman 2016-09-08 13:06:05 -04:00
Cory Fields fa2f8bc47f net: add nSendBufferMaxSize/nReceiveFloodSize to CConnection::Options 2016-09-08 13:06:00 -04:00
Cory Fields a19553b992 net: Introduce CConnection::Options to avoid passing so many params 2016-09-08 13:04:29 -04:00
Cory Fields bafa5fc5a1 net: Drop StartNode/StopNode and use CConnman directly 2016-09-08 12:24:07 -04:00
Cory Fields e81a602cf0 net: pass CClientUIInterface into CConnman 2016-09-08 12:24:07 -04:00
Cory Fields f60b9059e4 net: Pass best block known height into CConnman
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-08 12:24:06 -04:00
Cory Fields fdf69ff21a net: move max/max-outbound to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields bd72937dc4 net: move nLocalServices/nRelevantServices to CConnman
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-08 12:24:06 -04:00
Cory Fields 63cafa6329 net: move send/recv statistics to CConnman 2016-09-08 12:24:06 -04:00
Cory Fields 6c19d92361 net: move whitelist functions into CConnman 2016-09-08 12:24:06 -04:00
Cory Fields 502dd3a8a0 net: Add oneshot functions to CConnman 2016-09-08 12:12:57 -04:00
Cory Fields 02137f11e2 net: Move socket binding into CConnman 2016-09-08 12:06:24 -04:00
Cory Fields cd16f48028 net: Create CConnman to encapsulate p2p connections 2016-09-08 12:04:35 -04:00
Cory Fields d6a5dc4a2e add waitfornewblock/waitforblock/waitforblockheight rpcs and use them for tests
waitfornewblock waits until a new block is received, or the timeout expires, then
returns the current block height/hash.

waitforblock waits for a specific blockhash, or until the timeout expires, then
returns the current block height/hash. If the target blockhash is the current
tip, it will return immediately.

waitforblockheight waits until the tip has reached a certain height or higher,
then returns the current height and hash.

waitforblockheight is used to avoid polling in the rpc tests.
2016-09-07 12:46:01 -04:00
Jorge Timón cdd79eb70f C++11: s/boost::scoped_ptr/std::unique_ptr/ 2016-09-01 19:05:07 +02:00
Wladimir J. van der Laan a5bb6387f7
Merge #8607: [doc] Fix doxygen off-by-one comments, fix typos
fafe7b3 contrib: Make fix-copyright-headers.py more portable (MarcoFalke)
fa27c0a [doc] Fix typos in comments, doxygen: Fix comment syntax (MarcoFalke)
fabfd5d [qa] pull-tester: Don't mute zmq ImportError (MarcoFalke)
67a5502 init: Fix typo in help message for -whitelistforcerelay (Wladimir J. van der Laan)
2016-08-28 16:06:03 +02:00
MarcoFalke fa6dc9f0e5 Remove unused variables 2016-08-25 14:59:38 +02:00
Wladimir J. van der Laan f9167003d9
Merge #8445: Move CWallet::setKeyPool to private section of CWallet.
8680d3a Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet (Patrick Strateman)
e86eb71 Move CWallet::setKeyPool to private section of CWallet (Patrick Strateman)
2016-08-24 10:33:16 +02:00
Wladimir J. van der Laan 67a55025a1 init: Fix typo in help message for -whitelistforcerelay
Reported by pryds on Transifex in the Danish translation.
2016-08-22 10:51:13 +02:00
Patrick Strateman 8680d3aa80 Move wallet initialization logic from AppInit2 to CWallet::InitLoadWallet 2016-08-20 14:03:47 -07:00
Patrick Strateman e86eb71604 Move CWallet::setKeyPool to private section of CWallet 2016-08-17 15:24:57 -07:00
Wladimir J. van der Laan e753eaeb34
Merge #8505: Trivial: Fix typos in various files
1aacfc2 various typos (leijurv)
2016-08-17 12:51:16 +02:00
instagibbs edb6cf1432 remove no-longer-used InitError logic 2016-08-15 10:28:53 -04:00
Jonas Schnelli c503863150
Merge #8192: [trivial] Remove URLs from About dialog translations
208d37f [trivial] Remove URLs from About dialog translations (fanquake)
2016-08-15 15:36:42 +02:00
Wladimir J. van der Laan 1030fa718c
Merge #8128: Net: Turn net structures into dumb storage classes
9e9d644 net: fixup nits (Cory Fields)
8945384 net: Have LookupNumeric return a CService directly (Cory Fields)
21ba407 net: narrow include scope after moving to netaddress (Cory Fields)
21e5b96 net: move CNetAddr/CService/CSubNet out of netbase (Cory Fields)
1017b8a net: Add direct tests for new CSubNet constructors (Cory Fields)
b6c3ff3 net: Split resolving out of CSubNet (Cory Fields)
f96c7c4 net: Split resolving out of CService (Cory Fields)
31d6b1d net: Split resolving out of CNetAddr (Cory Fields)
2016-08-15 13:35:27 +02:00
leijurv 1aacfc2da5
various typos 2016-08-14 07:57:11 -06:00
MarcoFalke fa5d276c90 [init] ParameterInteraction() iff wallet enabled 2016-08-10 08:40:57 +02:00
Cory Fields 8945384bca net: Have LookupNumeric return a CService directly
Also fix up a few small issues:
- Lookup with "badip:port" now sets the port to 0
- Don't allow assert to have side-effects
2016-08-04 16:41:39 -04:00
Wladimir J. van der Laan f97d335942
Merge #8392: Fix several node initialization issues
9d4eb9a Do diskspace check before import thread is started (Pieter Wuille)
aa59f2e Add extra message to avoid a long 'Loading banlist' (Pieter Wuille)
0fd2a33 Use a signal to continue init after genesis activation (Pieter Wuille)
2016-08-04 12:33:21 +02:00
Pavel Janík 0fc00bea5d Do not shadow previous local variable 2016-08-02 10:26:54 +02:00
Pavel Janík 115265bb10 Trivial: bip -> BIP in help text and comment 2016-08-02 10:26:05 +02:00
Cory Fields 21ba407a73 net: narrow include scope after moving to netaddress
Net functionality is no longer needed for CAddress/CAddrman/etc. now that
CNetAddr/CService/CSubNet are dumb storage classes.
2016-07-31 14:01:44 -04:00
Cory Fields b6c3ff3dae net: Split resolving out of CSubNet 2016-07-31 14:01:43 -04:00
Cory Fields f96c7c4d91 net: Split resolving out of CService 2016-07-31 13:24:07 -04:00
Pieter Wuille 9d4eb9ad99 Do diskspace check before import thread is started 2016-07-30 02:17:51 +02:00
Pieter Wuille 0fd2a33648 Use a signal to continue init after genesis activation 2016-07-30 02:17:47 +02:00
Suhas Daftuar 56c87e9211 Allow changing BIP9 parameters on regtest 2016-07-29 09:41:58 -04:00
fanquake 208d37f116
[trivial] Remove URLs from About dialog translations 2016-07-21 16:21:08 +08:00
Pieter Wuille ab942c15bd Treat high-sigop transactions as larger rather than rejecting them 2016-07-19 12:31:49 +02:00
Suhas Daftuar 2c06bae39e Rename "block cost" to "block weight" 2016-07-18 13:28:26 -04:00
Wladimir J. van der Laan 8cef5bd58a mining: Improve -blockmaxcost help message
One-word replacement to #8354.
2016-07-18 10:56:25 +02:00
Wladimir J. van der Laan f5660d381a
Merge #8295: Mining-related fixups for 0.13.0
c1d61fb Add warning if -blockminsize is used. (Suhas Daftuar)
27362dd Remove -blockminsize option (Suhas Daftuar)
d2e46e1 Remove addScoreTxs() (Suhas Daftuar)
6dd4bc2 Exclude witness transactions in addPackageTxs() pre-segwit activation (Suhas Daftuar)
f15c2cd CreateNewBlock: add support for size-accounting to addPackageTxs (Suhas Daftuar)
2016-07-18 08:23:45 +02:00
Wladimir J. van der Laan 396f9d6296
Merge #8273: Bump -dbcache default to 300MiB
efd1d83 doc: Mention dbcache increase in release notes (Wladimir J. van der Laan)
32cab91 Bump `-dbcache` default to 300MiB (Wladimir J. van der Laan)
2016-07-06 07:46:47 +02:00
Wladimir J. van der Laan 32cab91278 Bump -dbcache default to 300MiB
Also cap the allocation for the leveldb-specific cache for the UTXO set
to 8MiB.
This avoids that the extra cache memory goes to the much less effective
leveldb cache instead of our application-level cache.
2016-07-06 07:44:51 +02:00
Wladimir J. van der Laan 042c323922
Merge #8275: Remove bad chain alert partition check
ab8be98 Remove bad chain alert partition check (BtcDrak)
2016-07-06 07:35:54 +02:00
Suhas Daftuar c1d61fbd08 Add warning if -blockminsize is used. 2016-07-05 19:57:45 -04:00
Suhas Daftuar 27362dda4d Remove -blockminsize option 2016-06-30 11:41:13 -04:00
Wladimir J. van der Laan ff03c50c00
Merge #8257: Do not ask a UI question from bitcoind
1acf1db Do not ask a UI question from bitcoind (Pieter Wuille)
2016-06-28 10:12:01 +02:00
Pieter Wuille 1acf1db76f Do not ask a UI question from bitcoind 2016-06-24 16:45:12 +02:00
Pieter Wuille 6032f6930a Add rewind logic to deal with post-fork software updates
Includes logic for dealing with pruning by Suhas Daftuar.
2016-06-22 15:43:00 +02:00
Pieter Wuille 2b1f6f9ccf BIP141: Other consensus critical limits, and BIP145
Includes changes by Suhas Daftuar, Luke-jr, and mruddy.
2016-06-22 15:43:00 +02:00
Pieter Wuille b8a97498df BIP144: Handshake and relay (receiver side)
Service bit logic by Nicolas Dorier.

Only download blocks from witness peers after fork.
2016-06-22 15:42:59 +02:00
MarcoFalke fa58e5ee93 [doc] Add website links to about dialog 2016-06-16 10:07:36 +02:00
BtcDrak ab8be98fdb Remove bad chain alert partition check
As per meeting 2016-03-31
https://bitcoincore.org/en/meetings/2016/03/31/#bad-chain-alerts

The partition checker was producing huge number of false-positives
and was disabled in 0.12.1 on the understanding it would either be
fixed in 0.13 or removed entirely from master if not.
2016-06-14 12:26:59 +01:00
Pieter Wuille ee06e04369 Introduce enum ServiceFlags for service flags 2016-06-13 17:40:16 +02:00
Wladimir J. van der Laan d096d22446 build: Get rid of CLIENT_DATE
Putting the build date in the executable is a practice that has no place
in these days, now that deterministic building is increasingly common.

Continues #7732 which did this for the GUI.
2016-06-09 13:34:09 +02:00
MarcoFalke fa51a1d2b7 [init] Make feefilter option debug option 2016-06-07 08:47:43 +02:00
Pieter Wuille a886dbf8e7 Use std::atomic for fRequestShutdown and fReopenDebugLog 2016-06-01 19:18:25 +02:00
Pieter Wuille fa2637a3be Always require OS randomness when generating secret keys 2016-05-29 01:52:17 +02:00
Pieter Wuille c028c7b755
Merge #8049: Expose information on whether transaction relay is enabled in getnetwork
1ab1dc3 rpc: Add `relaytxes` flag to `getnetworkinfo` (Wladimir J. van der Laan)
581ddff net: Add fRelayTxes flag (Wladimir J. van der Laan)
2016-05-26 15:02:16 +02:00
Wladimir J. van der Laan 6fc6325f77
Merge #8015: CCoinsViewErrorCatcher raison-d-etre
a4d5855 CCoinsViewErrorCatcher raison-d-etre (21E14)
2016-05-26 07:32:50 +02:00
Pieter Wuille d72098038f
Merge #8076: VerifyDB: don't check blocks that have been pruned
bd477f4 VerifyDB: don't check blocks that have been pruned (Suhas Daftuar)
2016-05-25 16:28:22 +02:00
Pieter Wuille c49c825bd9
Merge #8063: Acquire lock to check for genesis block.
46b0c3b Acquire lock to check for genesis block. (Patrick Strateman)
2016-05-25 16:12:20 +02:00
Suhas Daftuar bd477f4e8b VerifyDB: don't check blocks that have been pruned 2016-05-22 09:15:21 -04:00
Patrick Strateman 46b0c3b688 Acquire lock to check for genesis block. 2016-05-16 20:33:32 -07:00
Pieter Wuille d3d7547911 Add -reindex-chainstate that does not rebuild block index 2016-05-17 00:45:57 +02:00
Pieter Wuille 316623f2c1 Switch reindexing to AcceptBlock in-loop and ActivateBestChain afterwards 2016-05-17 00:45:49 +02:00
Wladimir J. van der Laan 581ddff05c net: Add fRelayTxes flag
Add a fRelayTxes to keep track of the relay transaction flag
we send to other peers.
2016-05-12 14:12:46 +02:00
Wladimir J. van der Laan 2efe38b832
Merge #8004: signal handling: fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
3262316 fReopenDebugLog and fRequestShutdown should be type sig_atomic_t (Chirag Davé)
2016-05-12 11:46:10 +02:00
Wladimir J. van der Laan 3e2c946cfd init: Move berkeleydb version reporting to wallet
Move the version reporting to Wallet::Verify, before starting
verification of the wallet.

This removes the dependency of init on a specific wallet database
library.

A further, trivial step towards resolving #7965.
2016-05-10 12:57:07 +02:00
Chirag Davé 326231611b fReopenDebugLog and fRequestShutdown should be type sig_atomic_t
This allows access as an atomic variable in the presence
of async interrupts.

See issue #7433 for more details
fixes: #7433
2016-05-09 08:20:58 -07:00
21E14 a4d5855a25 CCoinsViewErrorCatcher raison-d-etre 2016-05-06 00:10:49 -04:00
Pieter Wuille 7daa3adb24
Merge #7868: net: Split DNS resolving functionality out of net structures
d39f5b4 net: disable resolving from storage structures (Cory Fields)
3675699 net: resolve outside of storage structures (Cory Fields)
a98cd1f net: manually resolve dns seed sources (Cory Fields)
e9fc71e net: require lookup functions to specify all arguments (Cory Fields)
2016-04-21 13:48:13 +02:00
Cory Fields 367569926a net: resolve outside of storage structures
Rather than allowing CNetAddr/CService/CSubNet to launch DNS queries, require
that addresses are already resolved.

This greatly simplifies async resolve logic, and makes it harder to
accidentally leak DNS queries.
2016-04-20 13:08:19 -04:00
MarcoFalke fabbf80f2f [ui] Move InitError, InitWarning, AmountErrMsg 2016-04-02 15:26:21 +02:00
Wladimir J. van der Laan 30c2dd8d05
Merge #7691: [Wallet] refactor wallet/init interaction
25340b7 [Wallet] refactor wallet/init interaction (Jonas Schnelli)
2016-04-02 11:07:39 +02:00
Wladimir J. van der Laan 16555b658f
Merge #7766: rpc: Register calls where they are defined
fb8a8cf rpc: Register calls where they are defined (Wladimir J. van der Laan)
2016-03-31 10:55:15 +02:00
Wladimir J. van der Laan fb8a8cf2e6 rpc: Register calls where they are defined
Split out methods to every module, apart from 'help' and 'stop' which
are implemented in rpcserver.cpp itself.

- This makes it easier to add or remove RPC commands - no longer everything that includes
    rpcserver.h has to be rebuilt when there's a change there.
- Cleans up `rpc/server.h` by getting rid of the huge cluttered list of function definitions.
- Removes most of the bitcoin-specific code from rpcserver.cpp and .h.

Continues #7307 for the non-wallet.
2016-03-31 10:48:32 +02:00
mruddy e1523cee58 P2P: add maxtimeadjustment command line option 2016-03-29 14:40:00 +00:00
Jonas Schnelli 25340b7cd5
[Wallet] refactor wallet/init interaction 2016-03-22 08:20:59 +01:00
Alex Morcos 9e072a6e66 Implement "feefilter" P2P message.
The "feefilter" p2p message is used to inform other nodes of your mempool min fee which is the feerate that any new transaction must meet to be accepted to your mempool.  This will allow them to filter invs to you according to this feerate.
2016-03-21 10:46:25 -04:00
Wladimir J. van der Laan 29b2be6ad7
Merge #7692: Remove p2p alert system
cfd519e Add release note documentation (BtcDrak)
6601ce5 protocol.h/cpp: Removes NetMsgType::ALERT (Thomas Kerin)
ad72104 Formatting (BtcDrak)
1b77471 Remove alert keys (BtcDrak)
01fdfef Remove `-alerts` option (BtcDrak)
9206634 Update alert notification and GUI (BtcDrak)
bbb9d1d Remove p2p alert handling (BtcDrak)
2016-03-21 13:41:05 +01:00
Wladimir J. van der Laan 9426632cb5
Merge #7708: De-neuter NODE_BLOOM
c90036f Always disconnect old nodes which request filtered connections. (Patrick Strateman)
2016-03-21 12:44:19 +01:00
Patrick Strateman c90036f664 Always disconnect old nodes which request filtered connections. 2016-03-18 21:26:49 -07:00
BtcDrak 01fdfeffc4 Remove -alerts option 2016-03-18 19:33:59 +00:00
Pieter Wuille 6851107b3a BIP9 Implementation
Inspired by former implementations by Eric Lombrozo and Rusty Russell, and
based on code by Jorge Timon.
2016-03-15 16:54:38 +01:00
Wladimir J. van der Laan 11c769966a
Merge #7507: Remove internal miner
8d1de43 Remove internal miner (Leviathn)
2016-03-14 11:35:41 +01:00
Jonas Schnelli 15e6e13624
[Wallet] optimize return value of InitLoadWallet() 2016-03-14 09:33:27 +01:00
Jonas Schnelli fc7c60d699
[Wallet] move "load wallet phase" to CWallet 2016-03-11 14:31:06 +01:00
Wladimir J. van der Laan 86a1ec5b2c
Merge #7576: [Wallet] move wallet help string creation to CWallet
72c2651 [Wallet] move wallet help string creation to CWallet (Jonas Schnelli)
2016-03-11 08:40:37 +01:00
Wladimir J. van der Laan 9f14e5ad91
Merge #7553: Remove vfReachable and modify IsReachable to only use vfLimited.
110b62f Remove vfReachable and modify IsReachable to only use vfLimited. (Patrick Strateman)
2016-03-11 08:25:28 +01:00
Jonas Schnelli 72c2651581
[Wallet] move wallet help string creation to CWallet 2016-03-05 13:27:04 -05:00
Jonas Schnelli 5ecfa36fd0
Remove openssl info from init/log and from Qt debug window 2016-02-26 09:35:39 +01:00
Patrick Strateman 110b62f069 Remove vfReachable and modify IsReachable to only use vfLimited.
We do not know that a class of Network is reachable, only that it is not.
2016-02-17 23:21:27 -08:00
Wladimir J. van der Laan 2d4f73f47e
Merge #7509: Common argument defaults for NODE_BLOOM stuff and -wallet
1fb91b3 Common argument defaults for NODE_BLOOM stuff and -wallet (Luke Dashjr)
2016-02-16 10:00:21 +01:00
Wladimir J. van der Laan 621940e040
Merge #7520: LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead
a0a17b3 LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead (Pavel Janík)
2016-02-12 13:06:02 +01:00
Pavel Janík a0a17b3e44 LibreSSL doesn't define OPENSSL_VERSION, use LIBRESSL_VERSION_TEXT instead 2016-02-12 07:01:33 +01:00
Luke Dashjr 1fb91b3496 Common argument defaults for NODE_BLOOM stuff and -wallet 2016-02-11 06:38:04 +00:00
Leviathn 8d1de43f0c Remove internal miner
This code removes the internal miner which is only useful on Testnet.
This leaves the internal miner that is useful on RegTest intact.
2016-02-10 18:29:13 -08:00
Wladimir J. van der Laan 2cdbf28cf3
Merge #7192: Unify product name to as few places as possible
027fdb8 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen (Luke Dashjr)
cc2095e Rewrite FormatParagraph to handle newlines within input strings correctly (Luke Dashjr)
cddffaf Bugfix: Include COPYRIGHT_HOLDERS_SUBSTITUTION in Makefile substitutions so it gets passed to extract-strings correctly (Luke Dashjr)
29598e4 Move PACKAGE_URL to configure.ac (Luke Dashjr)
78ec83d splashscreen: Resize text to fit exactly (Luke Dashjr)
3cae140 Bugfix: Actually use _COPYRIGHT_HOLDERS_SUBSTITUTION everywhere (Luke Dashjr)
4d5a3df Bugfix: gitian-descriptors: Add missing python-setuptools requirement for OS X (biplist module) (Luke Dashjr)
e4ab5e5 Bugfix: Correct copyright year in Mac DMG background image (Luke Dashjr)
917b1d0 Set copyright holders displayed in notices separately from the package name (Luke Dashjr)
c39a6ff Travis & gitian-osx: Use depends for ds_store and mac_alias modules (Luke Dashjr)
902ccde depends: Add mac_alias to depends (Luke Dashjr)
82a2d98 depends: Add ds_store to depends (Cory Fields)
de619a3 depends: Pass PYTHONPATH along to configure (Cory Fields)
e611b6e macdeploy: Use rsvg-convert rather than cairosvg (Luke Dashjr)
63bcdc5 More complicated package name substitution for Mac deployment (Luke Dashjr)
1a6c67c Parameterise 2009 in translatable copyright strings (Luke Dashjr)
d5f4683 Unify package name to as few places as possible without major changes (Luke Dashjr)
2016-02-04 13:42:24 +01:00
Wladimir J. van der Laan 5fd95b4490
Merge #7431: Rename permitrbf to mempoolreplacement and provide minimal string-list forward compatibility (needs 0.12 backport)
b922fbe Rename replacebyfee=opt-in to mempoolreplacement=fee (Luke Dashjr)
3b66e54 Simplify check for replacebyfee=opt-in (Luke Dashjr)
d65dee9 Accept replacebyfee=opt-in for turning on opt-in RBF (Luke Dashjr)
77b55a0 Rename permitrbf to replacebyfee (Luke Dashjr)
2016-02-03 10:27:32 +01:00
Luke Dashjr a68bb9f5e7 Merge branch 'master' into single_prodname 2016-02-03 05:41:13 +00:00
Luke Dashjr 027fdb83b4 When/if the copyright line does not mention Bitcoin Core developers, add a second line to copyrights in -version, About dialog, and splash screen 2016-02-03 05:38:51 +00:00
Wladimir J. van der Laan 11d74f6a6b
Merge #7084: mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee
fa1193e [doxygen] Actually display comment (MarcoFalke)
fa331db mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee (MarcoFalke)
2016-02-02 15:18:07 +01:00
Luke Dashjr b922fbe063 Rename replacebyfee=opt-in to mempoolreplacement=fee 2016-02-01 19:30:37 +00:00
Gregory Maxwell 89d113e02a Blacklist -whitelistalwaysrelay; replaced by -whitelistrelay. 2016-02-01 12:32:57 +00:00
MarcoFalke fa331db68b mempool: Replace maxFeeRate of 10000*minRelayTxFee with maxTxFee 2016-01-30 11:29:22 +01:00
Luke Dashjr 3b66e54457 Simplify check for replacebyfee=opt-in 2016-01-29 01:28:54 +00:00
Gregory Maxwell 325c725fb6 Add whitelistforcerelay to control forced relaying.
Also renames whitelistalwaysrelay.

Nodes relay all transactions from whitelisted peers, this
 gets in the way of some useful reasons for whitelisting
 peers-- for example, bypassing bandwidth limitations.

The purpose of this forced relaying is for specialized gateway
 applications where a node is being used as a P2P connection
 filter and multiplexer, but where you don't want it getting
 in the way of (re-)broadcast.

This change makes it configurable with whitelistforcerelay.
2016-01-28 22:26:21 +00:00
Wladimir J. van der Laan 62f2d769e4
Merge #7348: MOVE ONLY: move rpc* to rpc/
d13f65e rpc: update inline comments to refer to new file paths (Daniel Cousens)
a0eaff8 move rpc* to rpc/ (Daniel Cousens)
2016-01-28 11:28:24 +01:00
Luke Dashjr d65dee961e Accept replacebyfee=opt-in for turning on opt-in RBF
Basic forward-compatibility with more flexible parameters like fss
2016-01-28 06:10:35 +00:00
Luke Dashjr 77b55a00ed Rename permitrbf to replacebyfee
"permit" is currently used to configure transaction filtering, whereas replacement is more to do with the memory pool state than the transaction itself.
2016-01-28 05:11:06 +00:00
MarcoFalke fae78fa818 [init] Clarify permitrbf help message 2016-01-23 22:46:24 +01:00