Commit graph

532 commits

Author SHA1 Message Date
Daniel Kraft af82884ab7 Add "warmup mode" for RPC server.
Start the RPC server before doing all the (expensive) startup
initialisations like loading the block index.  Until the node is ready,
return all calls immediately with a new error signalling "in warmup"
with an appropriate status message (similar to the init message).

This is useful for RPC clients to know that the server is there (e. g.,
they don't have to start it) but not yet available.  It is used in
Namecoin and Huntercoin already for some time, and there exists a UI
hooked onto the RPC interface that actively uses this to its advantage.
2014-11-04 16:01:09 +01:00
Wladimir J. van der Laan 96012e83f1
Merge pull request #5077
2aa6329 Enable customising node policy for datacarrier data size with a -datacarriersize option (Luke Dashjr)
2014-10-31 11:16:09 +01:00
Matt Corallo eadcd0c802 Print parameter interactions to console, too 2014-10-29 19:10:00 -07:00
jtimon eda3733091 MOVEONLY: Move CFeeRate and Amount constants to amount.o 2014-10-27 13:54:37 +01:00
Luke Dashjr 2aa632921e Enable customising node policy for datacarrier data size with a -datacarriersize option 2014-10-27 09:41:57 +00:00
Wladimir J. van der Laan f984c7d7ad
Merge pull request #5108
a873823 CAutoFile: Explicit Get() and remove unused methods (Wladimir J. van der Laan)
fef24ca Add IsNull() to class CAutoFile and remove operator ! (Ruben Dario Ponticeli)
2014-10-22 10:47:14 +02:00
Wladimir J. van der Laan a873823864
CAutoFile: Explicit Get() and remove unused methods
Also add documentation to some methods.
2014-10-22 10:18:19 +02:00
Wladimir J. van der Laan 9acbb4180a
qt: small English language updates from translators
More friendly language, use placeholders where possible
2014-10-21 15:40:43 +02:00
Wladimir J. van der Laan 5f3ea3362a
Merge pull request #5076
c0195b1 Bugfix: Remove default from -zapwallettxes description (inaccurate) (Luke Dashjr)
0a08aa8 Parameterise command line option defaults, so translations are independent of them (Luke Dashjr)
2014-10-21 14:53:55 +02:00
Pieter Wuille a96d113962 Rename CWalletInterface to CValidationInterface
It's useful for much more than wallets.
2014-10-20 10:59:12 -07:00
Pieter Wuille afc32c5eea Fix rebuild-chainstate feature and improve its performance
Previous refactorings broke the ability to rebuild the chainstate by deleting the chainstate
directory, resulting in an incorrect "Incorrect or no genesis block found" error message. Fix
that.

Also, improve the performance of ActivateBestBlockStep by using the skiplist to only discover
a few potential blocks to connect at a time, instead of all blocks forever - as we likely bail
out after connecting a single one anyway.
2014-10-14 15:42:01 -07:00
Luke Dashjr c0195b1c31 Bugfix: Remove default from -zapwallettxes description (inaccurate) 2014-10-14 20:13:44 +00:00
Wladimir J. van der Laan 992ab87114
Merge pull request #4942
9406471 Write fee estimate and peers files only when initialized (Wladimir J. van der Laan)
2014-10-14 11:35:17 +02:00
Luke Dashjr 0a08aa8f2a Parameterise command line option defaults, so translations are independent of them 2014-10-11 08:22:26 +00:00
Pieter Wuille d4a42334d4
Merge pull request #4834
7c70438 Get rid of the dummy CCoinsViewCache constructor arg (Pieter Wuille)
ed27e53 Add coins_tests with a large randomized CCoinViewCache test. (Pieter Wuille)
058b08c Do not keep fully spent but unwritten CCoins entries cached. (Pieter Wuille)
c9d1a81 Get rid of CCoinsView's SetCoins and SetBestBlock. (Pieter Wuille)
f28aec0 Use ModifyCoins instead of mutable GetCoins. (Pieter Wuille)
2014-10-08 14:58:16 -07:00
Wladimir J. van der Laan 6860a55ea0
Merge pull request #4979
de10efd add -timeout default as constant and use them (Philip Kaufmann)
2014-10-08 09:16:19 +02:00
Cozz Lovan 3e61eb9c51 minor txindex documentation improvement 2014-10-06 18:52:51 +02:00
Philip Kaufmann de10efd154 add -timeout default as constant and use them
- update help message text
- simplify code in init to check for -timeout
2014-10-06 13:13:25 +02:00
Pieter Wuille 471d38b015
Merge pull request #4980
20a11ff minor variable init changes in init.cpp (Philip Kaufmann)
2014-10-02 04:29:01 +02:00
Wladimir J. van der Laan 3fd192f8b4
Merge pull request #4234
c122f55 qt: Register CAmount metatype (Wladimir J. van der Laan)
a372168 Use a typedef for monetary values (Mark Friedenbach)
2014-10-01 11:28:55 +02:00
Pieter Wuille bf3a5dd7f0
Merge pull request #4796
e8b5f0d Move CBlockIndex, CChain and related code out of main (jtimon)
6db83db Decouple CChain from mapBlockIndex (jtimon)
2014-09-29 06:06:57 +02:00
Mark Friedenbach a372168e77 Use a typedef for monetary values 2014-09-26 15:42:04 -07:00
Cory Fields eee030f6bc autofile: don't copy CAutoFile by value 2014-09-25 19:25:19 -04:00
Philip Kaufmann 20a11ffabf minor variable init changes in init.cpp
- explicit init of pcoinsdbview and pwalletMain (even if not needed, as
  globals are init to NULL, it seems cleaner)
- remove check if (pwalletMain) in Shutdown() as delete is valid even if
  pwalletMain is NULL
2014-09-25 13:49:49 +02:00
Pieter Wuille 7c70438dc6 Get rid of the dummy CCoinsViewCache constructor arg 2014-09-24 03:19:04 +02:00
Wladimir J. van der Laan d6712db354
Also create pid file in non-daemon mode
Always make a pid file, not only when `-daemon` specified.

This is useful for troubleshooting, for attaching debuggers and loggers
and such.

- Write the pid file only after the datadir lock was acquired
- Don't create or remove a pid file on WIN32, and also don't show the option
2014-09-20 11:03:59 +02:00
Wladimir J. van der Laan 94064710b9 Write fee estimate and peers files only when initialized
Fixes #4669.

Move the loading of addresses to StartNode() to make it more
self-contained.
2014-09-18 14:20:18 +02:00
Pieter Wuille dc54e9db98
Merge pull request #4825
8d657a6 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' (ENikS)
2014-09-16 04:47:55 +02:00
Pieter Wuille 7388b74cd2
Merge pull request #4911
611116d header include cleanup (Philip Kaufmann)
2014-09-16 04:12:52 +02:00
Pieter Wuille 765f398436
Merge pull request #4875
f7e3637 Eliminate extra assignment (Suhas Daftuar)
ec7eb0f When reindexing check for file before trying to open (refactored) (Suhas Daftuar)
2014-09-16 03:21:21 +02:00
Philip Kaufmann 611116d4e3 header include cleanup
- ensures alphabetical ordering for includes etc. in source file headers
2014-09-14 12:43:56 +02:00
Wladimir J. van der Laan 3fa1c81b94
Merge pull request #4885
aa3c697 Store fewer orphan tx by default, add -maxorphantx option (Gavin Andresen)
c74332c Stricter handling of orphan transactions (Gavin Andresen)
2014-09-11 14:46:27 +02:00
Gavin Andresen aa3c697e90
Store fewer orphan tx by default, add -maxorphantx option
There is no reason to store thousands of orphan transactions;
normally an orphan's parents will either be broadcast or
mined reasonably quickly.

This pull drops the maximum number of orphans from 10,000 down
to 100, and adds a command-line option (-maxorphantx) that is
just like -maxorphanblocks to override the default.
2014-09-10 14:09:40 -04:00
Suhas Daftuar ec7eb0fa80 When reindexing check for file before trying to open (refactored) 2014-09-10 13:51:53 -04:00
Adam Weiss e982b574a5 Use explicit fflush() instead of setvbuf()
Flushing after every line when printing to console is desirable when
running with systemd but setvbuf() has slightly different semantics
on Windows that causes warnings.  Just do an explicit fflush() after
each line print to console instead.
2014-09-10 12:48:13 -04:00
jtimon 6db83db3eb Decouple CChain from mapBlockIndex 2014-09-08 22:14:24 +02:00
ENikS 8d657a6517 Fixing compiler warning C4800: 'type' forcing value to bool 'true' or 'false' 2014-09-06 15:59:59 -04:00
Pieter Wuille 145d5be896 Introduce BlockMap type for mapBlockIndex 2014-09-04 02:04:51 +02:00
Wladimir J. van der Laan 93f97aab62
Merge pull request #4768
2e28031 Perform CVerifyDB on pcoinsdbview instead of pcoinsTip (Wladimir J. van der Laan)
2014-09-01 09:42:10 +02:00
jtimon e9dd83f0a9 missing include boost/algorithm/string/replace.hpp 2014-08-29 22:52:41 +02:00
Jeff Garzik 309aa76d27
Merge pull request #4599 2014-08-29 15:23:13 -04:00
Wladimir J. van der Laan 2e280311b8
Perform CVerifyDB on pcoinsdbview instead of pcoinsTip
Bypassing the main coins cache allows more thorough checking with the same
memory budget.

This has no effect on performance because everything ends up in the child
cache created by VerifyDB itself.

It has bugged me ever since #4675, which effectively reduced the
number of checked blocks to reduce peak memory usage.

- Pass the coinsview to use as argument to VerifyDB

- This also avoids that the first `pcoinsTip->Flush()` after VerifyDB
  writes a large slew of unchanged coin records back to the database.
2014-08-27 09:20:33 +02:00
Wladimir J. van der Laan ad49c256c3 Split up util.cpp/h
Split up util.cpp/h into:

- string utilities (hex, base32, base64): no internal dependencies, no dependency on boost (apart from foreach)
- money utilities (parsesmoney, formatmoney)
- time utilities (gettime*, sleep, format date):
- and the rest (logging, argument parsing, config file parsing)

The latter is basically the environment and OS handling,
and is stripped of all utility functions, so we may want to
rename it to something else than util.cpp/h for clarity (Matt suggested
osinterface).

Breaks dependency of sha256.cpp on all the things pulled in by util.
2014-08-26 13:25:22 +02:00
Wladimir J. van der Laan 81212588c0 Remove print() from core functions
Break dependency on util.
2014-08-20 10:43:47 +02:00
Wladimir J. van der Laan 04d6c7d10c
Merge pull request #4605
aa82795 Add detailed network info to getnetworkinfo RPC (Wladimir J. van der Laan)
075cf49 Add GetNetworkName function (Wladimir J. van der Laan)
c91a947 Add IsReachable(net) function (Wladimir J. van der Laan)
60dc8e4 Allow -onlynet=onion to be used (Wladimir J. van der Laan)
2014-08-18 13:37:54 +02:00
Wladimir J. van der Laan aa8279513b
Add detailed network info to getnetworkinfo RPC
This commit adds per-network information to the
getnetworkinfo RPC call:

- Is the network limited?
- Is the network reachable
- Which proxy is used for this network, if any

Inspired by #2575.
2014-08-18 13:36:10 +02:00
Jeff Garzik c7b6117deb Create new signal for notification of new blocks. Use w/ -blocknotify 2014-08-14 12:32:34 -04:00
Wladimir J. van der Laan 5f1b76aaf0
Merge pull request #4615
283a3b8 small ordering cleanup of init help message (Philip Kaufmann)
2014-08-06 16:00:39 +02:00
pryds 2b410c2fe1 Typo, and a few "Bitcoin" -> "Bitcoin Core"
Github-Pull: #4619
2014-08-04 10:30:59 +02:00
Philip Kaufmann 283a3b88b6 small ordering cleanup of init help message 2014-08-01 08:04:46 +02:00