Commit Graph

3950 Commits

Author SHA1 Message Date
jtimon b82b7ec3dc Get rid of Params().RPCisTestNet() 2014-06-17 13:08:25 +02:00
Philip Kaufmann 1020f599f3 add comment to HelpMessage() to ensure alphabetical ordering
- also rename hmm to mode, to be consistent between .h and .cpp
2014-06-17 09:17:12 +02:00
Wladimir J. van der Laan 09eb201b1b Remove `using namespace std` from header file
It's considered bad form to import things into the global namespace in a
header. Put it in the cpp files where it is needed instead.
2014-06-16 17:42:54 +02:00
Wladimir J. van der Laan 807691ca96
Merge pull request #4326
f5ae6c9 add NetworkIDString() to chainparams (Philip Kaufmann)
2014-06-16 17:41:27 +02:00
Wladimir J. van der Laan f73082db87
Merge pull request #4337
88df548 base58: add paranoid return value checks (Jeff Garzik)
2014-06-16 17:29:43 +02:00
Wladimir J. van der Laan b750cf1fb9
Remove cli functionality from bitcoind
As it says on the tin. It was deprecated in version 0.9, and
at some point it should be removed.

Removes the dependency of bitcoind on libbitcoin-cli.a. Move
some functions that used to be shared but are now only used in
bitcoin-cli.cpp to that file.

After this change, an error is printed (and exit code 1 is returned)
when the user tries to send RPC commands using bitcoind.
2014-06-15 15:38:22 +02:00
Jeff Garzik 0cafb63025
bitcoin-cli, rpcclient: prefer EXIT_FAILURE cstdlib constant
A more complex construction via abs() yields the same end result.

Rebased-From: 34ff109
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
2014-06-15 14:47:04 +02:00
Wladimir J. van der Laan 8615bfb486
Merge pull request #4316
18116b0 Ignore too-long redeemScripts while loading wallet (Wladimir J. van der Laan)
2014-06-14 11:32:03 +02:00
Wladimir J. van der Laan 8047fb04ed
Merge pull request #4193
71aaff3 Remove double-dash parameters from mapArgs (Kosta Zertsekel)
2014-06-12 16:47:48 +02:00
Wladimir J. van der Laan fe1f417287
Merge pull request #4281
5c97aae qt: Unify AboutDialog and HelpMessageDialog (Wladimir J. van der Laan)
45615af Add 'about' information to `-version` output (Wladimir J. van der Laan)
97789d3 util: Add function FormatParagraph to format paragraph to fixed-width (Wladimir J. van der Laan)
96b733e Add `-version` option to get just the version (Wladimir J. van der Laan)
2014-06-12 16:42:55 +02:00
Wladimir J. van der Laan 5c97aae6da qt: Unify AboutDialog and HelpMessageDialog
They share so much code and functionality that they may as well
be one class.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan 45615af26f Add 'about' information to `-version` output
Adds a copyright and attribution message to the `-version` output
(the same as shown in the About dialog in the GUI).

Move the message to a function LicenseInfo in init.cpp.
2014-06-12 16:11:56 +02:00
Wladimir J. van der Laan 18116b06c1 Ignore too-long redeemScripts while loading wallet
This avoids that long redeemScripts that were grandfathered in
prevent the wallet from loading.

Fixes #4313.
2014-06-12 15:28:41 +02:00
Wladimir J. van der Laan e5ee8f016e
Remove -beta suffix
It conflicts with our normal naming of releases/builds. Fixes #4221.
2014-06-12 13:52:15 +02:00
Philip Kaufmann f5ae6c9826 add NetworkIDString() to chainparams
- returns the BIP70 network string
- use that new function in the core and GUI code and remove unused code
  and functions
2014-06-12 13:19:12 +02:00
Wladimir J. van der Laan 3f39b9d455
Merge pull request #2784
f1920e8 Ping automatically every 2 minutes (unconditionally) (Pieter Wuille)
2014-06-12 12:40:09 +02:00
Jeff Garzik 88df548dde base58: add paranoid return value checks 2014-06-11 23:20:37 -04:00
Andreas Schildbach c30329adfa Add testnet DNS seed of Alex Kotenko. 2014-06-12 00:36:53 +02:00
Philip Kaufmann f3790472f0 remove unused code from getblockchaininfo() 2014-06-11 14:56:08 +02:00
Wladimir J. van der Laan 97789d374c util: Add function FormatParagraph to format paragraph to fixed-width
This is to be used for the `-version` and `-help` messages.
2014-06-11 14:27:09 +02:00
Wladimir J. van der Laan 96b733e996 Add `-version` option to get just the version
Adds a `-version` or `--version` option to print just the version
of the program for bitcoind, bitcoin-cli and bitcoin-qt.

Also make it that `-help` can be used to display the help (as well as
existing `--help`). Up to now, `-help` was the only option that didn't
work with either one or two dashes.
2014-06-11 14:22:50 +02:00
Wladimir J. van der Laan 9c8d2f6df0
Merge pull request #4227
634bd61 convert an if into an else if in OpenNetworkConnection() (Philip Kaufmann)
5bd6c31 small cleanup of net (Philip Kaufmann)
2014-06-11 13:01:11 +02:00
Philip Kaufmann 634bd61b76 convert an if into an else if in OpenNetworkConnection() 2014-06-11 12:40:13 +02:00
Philip Kaufmann 5bd6c31bd6 small cleanup of net
- remove an unneded else in ConnectNode()
- make 0 a double and change to 0.0 in ConnectNode()
- rename strDest to pszDest in OpenNetworkConnection()
- remove an unneded call to our REF() macro in BindListenPort()
- small style cleanups and removal of unneeded new-lines
2014-06-11 12:38:31 +02:00
Philip Kaufmann 56b07d2dcd [Qt] allow setting listen via GUI
- add DEFAULT_LISTEN in net.h and use in the code (shared
  setting between core and GUI)

Important: This makes it obvious, that we need to re-think the
settings/options handling, as GUI settings are processed before
any parameter-interaction (which is mostly important for network
stuff) in AppInit2()!
2014-06-11 12:04:17 +02:00
Wladimir J. van der Laan 5905d71fe3
Merge pull request #4170
ac14bcc small formatting, indentation and comment fixes (Philip Kaufmann)
2014-06-11 11:31:00 +02:00
Wladimir J. van der Laan d01574f792
Merge pull request #4277
4a09e1d key.cpp: fail with a friendlier message on missing ssl EC support (Andrew Poelstra)
2014-06-11 08:34:25 +02:00
Wladimir J. van der Laan 4e45932659
Merge pull request #4321
699fe63 remove wrong ; in chainparams.h and order includes (Philip Kaufmann)
2014-06-11 08:26:20 +02:00
Wladimir J. van der Laan 40c3781365
Merge pull request #4323
38e324a build: qt: split locale resources. Fixes non-deterministic distcheck (Cory Fields)
2014-06-11 08:16:23 +02:00
Cory Fields 38e324af86 build: qt: split locale resources. Fixes non-deterministic distcheck
The rcc tool is quirky and only honors files in the same directory as the qrc.
When doing an out-of-tree build (as 'make distcheck' does), the generated
translation files end up in a different path, so rcc can't find them.

Split them up so that rcc is run twice: once for static source files and once
for generated files.
2014-06-10 15:53:21 -04:00
Philip Kaufmann 699fe635c6 remove wrong ; in chainparams.h and order includes 2014-06-10 19:33:12 +02:00
Philip Kaufmann 1c24187b51 remove unused UPnP code from main.h 2014-06-10 18:34:35 +02:00
Philip Kaufmann ac14bcc1f1 small formatting, indentation and comment fixes
- contains zero code changes
2014-06-10 18:23:56 +02:00
Wladimir J. van der Laan 6dd5edb7de
Remove unused Print/PrintHex functions
You can just use HexStr(script) or script.ToString() for debugging, no
need for these extra functions.
2014-06-10 15:03:21 +02:00
Wladimir J. van der Laan 588fb4e82f
Merge pull request #4305
95a9383 [Qt] Remove CENT-fee-rule from coin control completely (Cozz Lovan)
2014-06-10 10:42:42 +02:00
Pieter Wuille f1920e8606 Ping automatically every 2 minutes (unconditionally)
... instead of after 30 minutes of no sending, for latency measurement
and keep-alive. Also, disconnect if no reply arrives within 20 minutes,
instead of 90 of inactivity (for peers supporting the 'pong' message).
2014-06-09 23:06:56 +02:00
Wladimir J. van der Laan 6741837233
Merge pull request #4300
dff0e3b [Qt] Improve rpc console history behavior (Cozz Lovan)
2014-06-09 12:58:56 +02:00
Wladimir J. van der Laan 62fdf381fa
Merge pull request #3824
f0a83fc Use Params().NetworkID() instead of TestNet() from the payment protocol (jtimon)
2871889 net.h was using std namespace through chainparams.h included in protocol.h (jtimon)
c8c52de Replace virtual methods with static attributes, chainparams.h depends on protocol.h instead of the other way around (jtimon)
a3d946e Get rid of TestNet() (jtimon)
6fc0fa6 Add RPCisTestNet chain parameter (jtimon)
cfeb823 Add RequireStandard chain parameter (jtimon)
21913a9 Add AllowMinDifficultyBlocks chain parameter (jtimon)
d754f34 Move majority constants to chainparams (jtimon)
8d26721 Get rid of RegTest() (jtimon)
cb9bd83 Add DefaultCheckMemPool chain parameter (jtimon)
2595b9a Add DefaultMinerThreads chain parameter (jtimon)
bfa9a1a Add MineBlocksOnDemand chain parameter (jtimon)
1712adb Add MiningRequiresPeers chain parameter (jtimon)
2014-06-09 12:52:29 +02:00
Pieter Wuille 18e72167dd Push cs_mains down in ProcessBlock 2014-06-09 02:21:15 +02:00
Pieter Wuille 202e01941c Move all post-chaintip-change notifications to ActivateBestChain 2014-06-09 02:21:15 +02:00
Pieter Wuille 4e0eed88ac Allow ActivateBestChain to release its lock on cs_main 2014-06-09 02:21:15 +02:00
Pieter Wuille 77339e5aec Get rid of the static chainMostWork (optimization) 2014-06-09 02:21:15 +02:00
Cozz Lovan 95a93836d8 [Qt] Remove CENT-fee-rule from coin control completely 2014-06-08 01:48:11 +02:00
Drak 02bec4b268 Fix compiler warnings
Fixes the following compiler warning

```
miner.cpp: In constructor ‘COrphan::COrphan(const CTransaction*)’:
miner.cpp:69:14: warning: ‘COrphan::feeRate’ will be initialized after [-Wreorder]
     CFeeRate feeRate;
              ^
miner.cpp:68:12: warning:   ‘double COrphan::dPriority’ [-Wreorder]
     double dPriority;
            ^
miner.cpp:71:5: warning:   when initialized here [-Wreorder]
     COrphan(const CTransaction* ptxIn) : ptx(ptxIn), feeRate(0), dPriority(0)
```
2014-06-07 12:57:58 +01:00
Cozz Lovan dff0e3b915 [Qt] Improve rpc console history behavior 2014-06-07 13:20:30 +02:00
Wladimir J. van der Laan db41541bc2
qt: Periodic translation update 2014-06-06 19:29:03 +02:00
Gavin Andresen 171ca7745e estimatefee / estimatepriority RPC methods
New RPC methods: return an estimate of the fee (or priority) a
transaction needs to be likely to confirm in a given number of
blocks.

Mike Hearn created the first version of this method for estimating fees.
It works as follows:

For transactions that took 1 to N (I picked N=25) blocks to confirm,
keep N buckets with at most 100 entries in each recording the
fees-per-kilobyte paid by those transactions.

(separate buckets are kept for transactions that confirmed because
they are high-priority)

The buckets are filled as blocks are found, and are saved/restored
in a new fee_estiamtes.dat file in the data directory.

A few variations on Mike's initial scheme:

To estimate the fee needed for a transaction to confirm in X buckets,
all of the samples in all of the buckets are used and a median of
all of the data is used to make the estimate. For example, imagine
25 buckets each containing the full 100 entries. Those 2,500 samples
are sorted, and the estimate of the fee needed to confirm in the very
next block is the 50'th-highest-fee-entry in that sorted list; the
estimate of the fee needed to confirm in the next two blocks is the
150'th-highest-fee-entry, etc.

That algorithm has the nice property that estimates of how much fee
you need to pay to get confirmed in block N will always be greater
than or equal to the estimate for block N+1. It would clearly be wrong
to say "pay 11 uBTC and you'll get confirmed in 3 blocks, but pay
12 uBTC and it will take LONGER".

A single block will not contribute more than 10 entries to any one
bucket, so a single miner and a large block cannot overwhelm
the estimates.
2014-06-06 10:44:57 -04:00
Gavin Andresen c6cb21d17a Type-safe CFeeRate class
Use CFeeRate instead of an int64_t for quantities that are
fee-per-size.

Helps prevent unit-conversion mismatches between the wallet,
relaying, and mining code.
2014-06-06 10:34:18 -04:00
Wladimir J. van der Laan 345cb52e8b
Merge pull request #4297
b917555 qt: PeerTableModel: Fix potential deadlock. #4296 (Ashley Holman)
2014-06-06 10:13:48 +02:00
Ashley Holman b917555b04
qt: PeerTableModel: Fix potential deadlock. #4296 2014-06-06 16:59:15 +09:30