Commit graph

4156 commits

Author SHA1 Message Date
Cory Fields
679240d0e9 sanity: add libc/stdlib sanity checks
These are meant to test our back-compat stubs, but they are enabled for all
builds for the sake of consistency.
2014-06-16 17:21:34 -04:00
Cozz Lovan
b3c912d93a [Qt] Change Coin control labels and tooltips because of non-rounding fees 2014-06-16 22:39:43 +02:00
Cozz Lovan
77cbd4623e Let -zapwallettxes recover transaction meta data 2014-06-16 18:56:57 +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
1569353b8a
Add -stopafterblockimport option
Stop after importing blocks. This can be useful for development
and trouble shooting.
2014-06-16 11:47:32 +02:00
Philip Kaufmann
6763018797 [Qt] rename In:/Out: to Received/Sent in traffic tab
- collides with In:/Out: used for displaying number of
  connections when translating
2014-06-16 08:23:45 +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
kevin
33cc907dfb Add DNS seed of open-nodes.org 2014-06-15 15:35:53 +08: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
4aaa01783d rework help messages for fee-related options
- mention the units and show the default for -paytxfee
2014-06-11 12:16:26 +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
Pieter Wuille
7a9e0b6460 Move checkpoint based heuristic checks to AcceptBlockHeader 2014-06-09 01:27:56 +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
Cory Fields
efe6888407 build: fix version dependency 2014-06-05 16:05:57 -04:00
Cory Fields
f4d81129f0 build: quit abusing AM_CPPFLAGS
Now that the build is non-recursive, adding to AM_CPPFLAGS means adding to
_all_ cppflags.

Logical groups of includes have been added instead, and are used individually
by various targets.
2014-06-05 16:05:57 -04:00
Cory Fields
56c157d5e0 build: avoid the use of top_ and abs_ dir paths
Using them has the side effect of confusing the dependency-tracking logic.
2014-06-05 16:05:57 -04:00
Cory Fields
70c71c50ce build: Tidy up file generation output
- Some file generation was still noisy, silence it.
- AM_V_GEN is used rather than @ so that 'make V=1' works as intended
- Cut down on file copies and moves when using sed, use pipes instead
- Avoid the use of top_ and abs_ dirs where possible
2014-06-05 16:05:57 -04:00
Cory Fields
6b9f0d5554 build: nuke Makefile.include from orbit
Rules and targets no longer need to be shared between subdirectories, so
this is no longer needed.
2014-06-05 16:05:57 -04:00
Cory Fields
8b09ef7b63 build: add stub makefiles for easier subdir builds 2014-06-05 16:05:43 -04:00
Cory Fields
be4e9aeb14 build: delete old Makefile.am's 2014-06-05 16:05:42 -04:00
Cory Fields
65e8ba4dbe build: Switch to non-recursive make
Build logic moves from individual Makefile.am's to include files, which
the main src/Makefile.am includes. This avoids having to manage a gigantic
single Makefile.

TODO: Move the rules from the old Makefile.include to where they actually
belong and nuke the old file.
2014-06-05 16:05:17 -04:00
Wladimir J. van der Laan
7d4dda7630 Remove global strWalletFile
As it says on the tin. There is no need to have this variable be
global, it's only used in AppInit2.
2014-06-05 14:52:34 +02:00
Wladimir J. van der Laan
a92aded70e
Fix GUI build with --disable-wallet
fe6bff2 and 65f78a1 broke it. Minor build changes.
2014-06-05 07:00:16 +02:00
Wladimir J. van der Laan
d900ab9e66
Merge pull request #4291
fe6bff2 [Qt] add BerkeleyDB version info to RPCConsole (Philip Kaufmann)
2014-06-05 06:29:11 +02:00
Gavin Andresen
4fee61a905 Merge pull request #4287 from laanwj/2014_06_sideeffect
Remove side effect in assertion in ProcessGetData
2014-06-04 20:15:45 -04:00
Philip Kaufmann
fe6bff2eae [Qt] add BerkeleyDB version info to RPCConsole
- to match info function between debug.log and RPCConsole
2014-06-04 22:00:59 +02:00
Philip Kaufmann
5bd02cf715 log used config file to debug.log on startup 2014-06-04 21:19:22 +02:00
Jeff Garzik
b8ac6cdf53 Merge pull request #4282 from jgarzik/fix-wallet-init
CWallet: fix nTimeFirstKey init, by making constructor init common code
2014-06-04 15:00:58 -04:00
Jeff Garzik
c79897af31 Merge pull request #4247 from Diapolo/listen
rename fNoListen to fListen and move to net
2014-06-04 15:00:38 -04:00
Wladimir J. van der Laan
f0f4904bec
Merge pull request #4258
7b45d94 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) (shshshsh)
2014-06-04 19:30:44 +02:00
Wladimir J. van der Laan
d24310d23a
Merge pull request #4260
aab2c0f Remove template matching params from GetOpName() (Huang Le)
2014-06-04 19:27:03 +02:00
Wladimir J. van der Laan
4a48a0671d
Remove side effect in assertion in ProcessGetData
A side-effect was introduced into an assertion in 7a0e84d. This commit
fixes that.
2014-06-04 16:02:04 +02:00
jtimon
f0a83fc256 Use Params().NetworkID() instead of TestNet() from the payment protocol 2014-06-04 15:33:11 +02:00
shshshsh
7b45d943b2 Make max number of orphan blocks kept in memory a startup parameter (fixes #4253) 2014-06-04 11:58:18 +00:00
jtimon
2871889e83 net.h was using std namespace through chainparams.h included in protocol.h 2014-06-04 13:29:36 +02:00
jtimon
c8c52de3a0 Replace virtual methods with static attributes, chainparams.h depends on
protocol.h instead of the other way around
2014-06-04 13:29:36 +02:00
jtimon
a3d946ebdc Get rid of TestNet() 2014-06-04 13:29:36 +02:00
jtimon
6fc0fa63d9 Add RPCisTestNet chain parameter 2014-06-04 13:29:36 +02:00
jtimon
cfeb8235fd Add RequireStandard chain parameter 2014-06-04 13:29:36 +02:00
jtimon
21913a9ac9 Add AllowMinDifficultyBlocks chain parameter 2014-06-04 13:29:36 +02:00
jtimon
d754f34e8d Move majority constants to chainparams 2014-06-04 13:29:36 +02:00
jtimon
8d26721498 Get rid of RegTest() 2014-06-04 13:29:35 +02:00
jtimon
cb9bd83bba Add DefaultCheckMemPool chain parameter 2014-06-04 13:29:35 +02:00
jtimon
2595b9ac23 Add DefaultMinerThreads chain parameter 2014-06-04 13:29:35 +02:00
jtimon
bfa9a1a638 Add MineBlocksOnDemand chain parameter 2014-06-04 13:29:35 +02:00
jtimon
1712adbe0b Add MiningRequiresPeers chain parameter 2014-06-04 13:29:35 +02:00
Kosta Zertsekel
71aaff393f Remove double-dash parameters from mapArgs
Should be merged after pull request #4281
("Add `-version` option to get just the version #4281"),
because is changed "--help" to "-help".

Checked that grep of 'mapArgs.count("--' returned only
three places that are fixed by pull request #4281.
2014-06-04 11:27:15 +03:00
Wladimir J. van der Laan
358a61ee06
Merge pull request #4223
06a91d9 VerifyDB progress (Cozz Lovan)
2014-06-04 09:14:51 +02:00
Andrew Poelstra
4a09e1df51
key.cpp: fail with a friendlier message on missing ssl EC support
Previously if bitcoind is linked with an OpenSSL which is compiled
without EC support, this is seen as an assertion failure "pKey !=
NULL" at key.cpp:134, which occurs after several seconds. It is an
esoteric piece of knowledge to interpret this as "oops, I linked
with the wrong OpenSSL", and because of the delay it may not even
be noticed.

The new output is

: OpenSSL appears to lack support for elliptic curve cryptography. For
more information, visit
https://en.bitcoin.it/wiki/OpenSSL_and_EC_Libraries
: Initialization sanity check failed. Bitcoin Core is shutting down.

which occurs immediately after attempted startup.

This also blocks in an InitSanityCheck() function which currently only
checks for EC support but should eventually do more. See #4081.
2014-06-03 12:09:51 -07:00
Jeff Garzik
d04fd3e2af CWallet: fix nTimeFirstKey init, by making constructor init common code
Don't repeat yourself etc.
2014-06-03 12:55:33 -04:00
Cozz Lovan
06a91d9698 VerifyDB progress 2014-06-03 15:21:47 +02:00
Philip Kaufmann
bbe1925ce3 [Qt] style police and small addition in rpcconsole
- fix spaces, indentation and coding style glitches
2014-06-03 15:01:50 +02:00
Wladimir J. van der Laan
4c097f9669
Merge pull request #4225
65f78a1 Qt: Add GUI view of peer information. #4133 (Ashley Holman)
2014-06-03 11:13:51 +02:00
Ashley Holman
65f78a111f
Qt: Add GUI view of peer information. #4133 2014-06-03 17:37:34 +09:30
tm314159
91855f279d Properly initialize CWallet::nTimeFirstKey 2014-06-02 11:32:33 -07:00
Wladimir J. van der Laan
73b072252b
Merge pull request #3837
75ebced added many rpc wallet tests (Alon Muroch)
2014-06-02 18:00:37 +02:00
Wladimir J. van der Laan
52d7a54434
Merge pull request #3683
bdc83e8 [Qt] ensure payment request network matches client network (Philip Kaufmann)
2014-06-02 17:59:20 +02:00
Wladimir J. van der Laan
51615e1693
Merge pull request #4213
516053c Make links on 'About Bitcoin Core' into clickable (squashed 5 comits into one) (Tawanda Kembo)
2014-06-02 15:21:42 +02:00
Wladimir J. van der Laan
be7d0adcdb
Merge pull request #4238
b90711c [Qt] Fix Transaction details shows wrong To: (Cozz Lovan)
2014-06-02 15:12:12 +02:00
Wladimir J. van der Laan
42d87749eb
Merge pull request #4261
09a54a6 Use pnode->nLastRecv as sync score directly (Huang Le)
2014-06-02 14:25:09 +02:00
Wladimir J. van der Laan
ead1f65256
Merge pull request #4268
223a6f7 Fix stray uppercase A in tx_valid.json. (Andreas Schildbach)
2014-06-02 10:54:20 +02:00
Tawanda Kembo
516053c349 Make links on 'About Bitcoin Core' into clickable (squashed 5 comits into one)
Made the following links clickable:
http://www.opensource.org/licenses/mit-license.php
http://www.openssl.org/
eay@cryptsoft.com

(Squashed commits into one commit as suggested by @laanwj)

Replaced label with text browser on About Bitcoin Core Screen

So that the links on the About screen can be clickable

Replaced html property with text property

I have now removed unnecessary html so this should make life easier for
translators and you @Diapolo :). What do you think?

The size of the window needs to change

The size of the window needs to change when you make links clickable.
Thanks  for pointing that out @laanwj

Using the https://www.openssl.org over the http link

Using the https://www.openssl.org over the http link as suggested by
@Diapolo
2014-06-02 09:21:53 +02:00
Wladimir J. van der Laan
11ef78f115
Periodic language update
Pull updated translations from Transifex before 0.9.2
2014-06-01 16:25:22 +02:00
Andreas Schildbach
223a6f7800 Fix stray uppercase A in tx_valid.json. 2014-06-01 15:25:21 +02:00
Wladimir J. van der Laan
cc342a3ede
Merge pull request #4257
5823449 Limit number of known addresses per peer (Pieter Wuille)
2014-06-01 09:53:04 +02:00
Philip Kaufmann
cb7a3edc3d remove dup of extern int nConnectTimeout; in netbase 2014-05-31 12:04:34 +02:00
Huang Le
aab2c0fd7e Remove template matching params from GetOpName()
Since they are not real opcodes, being reported as OP_UNKNOWN is less confusing for human-readable decoding.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-05-31 01:23:53 +08:00
Huang Le
09a54a65c0 Use pnode->nLastRecv as sync score directly
NodeSyncScore() should find the node which we recv data most recently, so put a negative sign to pnode->nLastRecv is indeed wrong.

Also change the return value type to int64_t.

Signed-off-by: Huang Le <4tarhl@gmail.com>
2014-05-30 23:44:44 +08:00
Pieter Wuille
5823449e2d Limit number of known addresses per peer 2014-05-30 12:01:53 +02:00
Cory Fields
c21c74bec4 osx: Fix missing dock menu with qt5
Qt5 Removed the qt_mac_set_dock_menu function and left no replacement. It was
later re-added and deprecated for backwards-compatibility.

Qt5.2 adds the non-deprecated QMenu::setAsDockMenu(). Use that when possible.
2014-05-29 15:32:24 -04:00
Pieter Wuille
b5ef85c7a2 No references to centralized databases in help text. 2014-05-29 18:17:34 +02:00
Philip Kaufmann
53a088154c rename fNoListen to fListen and move to net
- better code readability and it belongs to net
- this is a prerequisite for a pull to add -listen to the GUI
2014-05-29 14:01:39 +02:00
Wladimir J. van der Laan
67f43a99ae
Merge pull request #4132
d4e1c61 add DEFAULT_UPNP constant in net (Philip Kaufmann)
2014-05-29 11:46:28 +02:00
Cozz Lovan
066d9a53c7 [Qt] Fix Start bitcoin on system login 2014-05-29 05:23:37 +02:00
Mathy Vanvoorden
d2b82dd7d8
Spelling fix in comment
Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 3704a6a
2014-05-28 15:55:22 +02:00
Wladimir J. van der Laan
37634587a7
Merge pull request #4184
122549f Fix incorrect checkpoint data for testnet3 (David Hill)
2014-05-28 10:11:42 +02:00
Cozz Lovan
b90711cabf [Qt] Fix Transaction details shows wrong To: 2014-05-28 01:38:40 +02:00
Wladimir J. van der Laan
bdc7f1a101
Merge pull request #3861
9ec0306 Add CODESEPARATOR/FindAndDelete() tests (Peter Todd)
2014-05-27 09:41:00 +02:00
Wladimir J. van der Laan
73f7153f43
Merge pull request #4206
79d06dc Remove redundant c_str (R E Broadley)
2014-05-25 16:46:49 +02:00
Wladimir J. van der Laan
0f1040ba52
Merge pull request #4183
f40dbee remove CPubKey::VerifyCompact( ) which is never used (Kamil Domanski)
28b6c1d remove GetMedianTime( ) which is never used (Kamil Domanski)
5bd4adc remove LookupHostNumeric( ) which is never used (Kamil Domanski)
595f691 remove LogException( ) which is never used (Kamil Domanski)
f4057cb remove CTransaction::IsNewerThan which is never used (Kamil Domanski)
0e31e56 remove CWallet::AddReserveKey which is never used (Kamil Domanski)
2014-05-25 16:19:54 +02:00
Cory Fields
e9df7f8757 Qt: Fix monospace font in osx 10.9
The "Monospace" hint was added in Qt 4.8, and it works as intended as opposed
to "TypeWriter" which fails to load a font.
2014-05-24 11:13:39 -04:00
Federico Bond
cdb36eff9f Fix warning when compiling in OS X 2014-05-23 14:00:14 -03:00
Wladimir J. van der Laan
a8a0db6f21
qt: Periodic language update
Last-minute language update before release 0.9.2.
2014-05-23 17:56:07 +02:00
Wladimir J. van der Laan
97b53b581b
Merge pull request #4152
3e8ac6a Replace non-threadsafe gmtime and setlocale (Wladimir J. van der Laan)
a60838d Replace non-threadsafe strerror (Wladimir J. van der Laan)
2014-05-23 15:52:45 +02:00
Wladimir J. van der Laan
3e8ac6af9a
Replace non-threadsafe gmtime and setlocale
Make DateTimeStrFormat use boost::posix_time.

Also re-enable the util_DateTimeStrFormat tests, as they are no
longer platform specific.
2014-05-23 15:23:11 +02:00
Wladimir J. van der Laan
7cdcfa3524
Merge pull request #4212
d90491a Update test_main.cpp (LongShao007)
2014-05-23 11:42:36 +02:00
Wladimir J. van der Laan
1b7bcba1c1
Merge pull request #4166
b641c9c Fix addnode "onetry": Connect with OpenNetworkConnection (Cozz Lovan)
2014-05-23 11:39:18 +02:00
Wladimir J. van der Laan
a60838d09a Replace non-threadsafe strerror
Log the name of the error as well as the error code if a network problem
happens. This makes network troubleshooting more convenient.

Use thread-safe strerror_r and the WIN32 equivalent FormatMessage.
2014-05-23 09:45:04 +02:00
LongShao007
d90491a766 Update test_main.cpp
i think should delete (#include "bitcoin-config.h")。
2014-05-22 21:41:59 +08:00
Wladimir J. van der Laan
a48355dc44
Remove forward declaration for non-existent class CCoinsDB
Found by stephenreed on #bitcoin.dev.
2014-05-22 13:09:31 +02:00
R E Broadley
79d06dc6e0 Remove redundant c_str 2014-05-22 00:23:03 +07:00
Wladimir J. van der Laan
8cd900711c
Merge pull request #4204
305ccaa Add missing LOCK(cs_main) (Pieter Wuille)
2014-05-21 14:10:51 +02:00
Wladimir J. van der Laan
6fcdad787f
qt: Periodic language update 2014-05-21 12:27:54 +02:00
Pieter Wuille
305ccaa275 Add missing LOCK(cs_main) 2014-05-20 21:45:12 +02:00
Philip Kaufmann
d4e1c61212 add DEFAULT_UPNP constant in net
- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
2014-05-20 15:34:19 +02:00
Kamil Domanski
f40dbeedde remove CPubKey::VerifyCompact( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
28b6c1def5 remove GetMedianTime( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
5bd4adca71 remove LookupHostNumeric( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
595f691d0a remove LogException( ) which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
f4057cb749 remove CTransaction::IsNewerThan which is never used 2014-05-20 14:58:21 +02:00
Kamil Domanski
0e31e5631c remove CWallet::AddReserveKey which is never used 2014-05-20 14:58:20 +02:00
Wladimir J. van der Laan
9d97e83bf6
Merge pull request #4197
0b78ba8 Remove fDaemon flag checking on return from main(), which is useless and looks really strange. (Huang Le)
2014-05-20 12:38:27 +02:00
Wladimir J. van der Laan
dff9d2f293
Merge pull request #4199
0a59723 Remove extraneous c_str (R E Broadley)
2014-05-20 09:45:40 +02:00
R E Broadley
0a59723ff6 Remove extraneous c_str 2014-05-20 12:31:26 +08:00
Huang Le
0b78ba8ad6 Remove fDaemon flag checking on return from main(), which is useless and looks really strange. 2014-05-20 01:22:33 +08:00
Wladimir J. van der Laan
aed38cbcb5
Merge pull request #4173
8c93bf4 LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. (Ashley Holman)
7a0e84d ProcessGetData(): abort if a block file is missing from disk (Ashley Holman)
2014-05-19 17:02:29 +02:00
Wladimir J. van der Laan
c26acfc308
Merge pull request #4174
5248ff4 SetupEnvironment() - clean commit (Stuart Cardall)
2014-05-19 15:08:48 +02:00
David Hill
122549f6de Fix incorrect checkpoint data for testnet3 2014-05-13 16:38:36 -04:00
Stuart Cardall
5248ff4099 SetupEnvironment() - clean commit 2014-05-13 10:15:00 +00:00
Kamil Domanski
be54b87f22 remove ParseString(...) which is never used 2014-05-13 12:00:24 +02:00
Kamil Domanski
d56e30ca89 removed a few unnecessary casts 2014-05-13 11:42:00 +02:00
Kamil Domanski
3e74ac22d5 json_spirit: #include <stdint.h> 2014-05-13 11:41:59 +02:00
Kamil Domanski
4b61a6a478 switch from boost int types to <stdint.h> 2014-05-13 11:41:59 +02:00
Wladimir J. van der Laan
f923c07754 Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost
First query in the current way (intelligently determining which network
has a non-localhost interface). If this does not succeed, try plain
lookup.

Needed for testing.

Fixes #1827 by always allowing IPv6 to be used.
2014-05-13 07:23:23 +02:00
Wladimir J. van der Laan
deb3572ab1 Add -rpcbind option to allow binding RPC port on a specific interface
Add -rpcbind command option to specify binding RPC service on one
or multiple specific interfaces.

Functionality if -rpcbind is not specified remains the same as before:

- If no -rpcallowip specified, bind on localhost
- If no -rpcbind specified, bind on any interface

Implements part of #3111.
2014-05-13 07:23:23 +02:00
Wladimir J. van der Laan
fa41db8779
Merge pull request #4181
f25e3ad Fix build in OS X 10.9 (Federico Bond)
2014-05-13 07:11:10 +02:00
Wladimir J. van der Laan
795b921dd2
qt: periodic language update
Pull updated translations from Transifex.

Add mn (Mongolian) language.

Do not update English translation for now as we want to keep
compatibility with 0.9.
2014-05-13 07:06:37 +02:00
Federico Bond
f25e3adf7d Fix build in OS X 10.9 2014-05-13 01:39:42 -03:00
Wladimir J. van der Laan
53d9709e1c
Merge pull request #4142
cef4494 rpc: keep track of acceptors, and cancel them in StopRPCThreads (Wladimir J. van der Laan)
381b25d doc: remove mention of `-rpctimeout` from man page (Wladimir J. van der Laan)
1a44522 rpc: Make sure conn object is always cleaned up (Wladimir J. van der Laan)
0a0cd34 rpc: pass errors from async_accept (Wladimir J. van der Laan)
2014-05-12 17:51:45 +02:00
Ashley Holman
8c93bf4c28 LoadBlockIndexDB(): Require block db reindex if any blk*.dat files are missing. 2014-05-12 08:09:09 -05:00
Wladimir J. van der Laan
c3ad56f4e0
Merge pull request #4138
783b182 Remove dummy PRIszX macros for formatting (Wladimir J. van der Laan)
2014-05-12 14:01:48 +02:00
Wladimir J. van der Laan
68d5fb3cb3
Merge pull request #4165
f6b7c64 Move base58.h implementation code to base58.cpp (Pieter Wuille)
2014-05-12 13:52:03 +02:00
Peter Todd
9ec030622f
Add CODESEPARATOR/FindAndDelete() tests 2014-05-12 06:51:41 -04:00
Wladimir J. van der Laan
029f4904d1
Merge pull request #4161
938b689 Squashed 'src/leveldb/' changes from 9094c7f..7924331 (Pieter Wuille)
2014-05-12 11:30:03 +02:00
Wladimir J. van der Laan
cef44941e7 rpc: keep track of acceptors, and cancel them in StopRPCThreads
Fixes #4156.

The problem is that the boost::asio::io_service destructor
waits for the acceptors to finish (on windows, and boost 1.55).

Fix this by keeping track of the acceptors and cancelling them before
stopping the event loops.
2014-05-12 09:31:06 +02:00
Wladimir J. van der Laan
1a445225f6 rpc: Make sure conn object is always cleaned up
Make sure conn object always gets cleaned up by using a
`boost::shared_ptr`.

This makes valgrind happy - before this commit, one connection object
always leaked at shutdown, as well as can avoid other leaks, when
for example an exception happens.

Also add an explicit Close() to the !ClientAllowed path to make it similar
to the normal path (I'm not sure whether it is needed, but it
can't hurt).
2014-05-12 09:30:46 +02:00
Wladimir J. van der Laan
0a0cd34552 rpc: pass errors from async_accept
According to the [boost::asio documentation](http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/reference/basic_socket_acceptor/async_accept/overload2.html),
the function signature of the handler must be:

    void handler(
      const boost::system::error_code& error // Result of operation.
    );

We were binding *all* the arguments, instead of all but the error,
resulting in nullary function that never got the error. Fix this
by adding an input argument substitution.
2014-05-12 09:30:46 +02:00
shshshsh
283e405c06 Switch stdout to line buffering
Use line buffering (instead of block buffering) so that messages arrive
immediately in systemd-journald, tail -f debug.log, and the like.
2014-05-11 23:09:21 +00:00
Ashley Holman
7a0e84dd63 ProcessGetData(): abort if a block file is missing from disk 2014-05-11 07:06:26 -05:00
Wladimir J. van der Laan
2653e00b12
Merge pull request #4160
7cd0af7 Move bignum.h to test/ (Pieter Wuille)
ccc84e0 Reduce bignum.h now it is only needed for scriptnum_tests (Pieter Wuille)
2014-05-10 15:32:18 +02:00
Pieter Wuille
f6b7c644c9 Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +02:00
Cozz Lovan
b641c9cd21 Fix addnode "onetry": Connect with OpenNetworkConnection 2014-05-10 00:39:49 +02:00
Matthew Bogosian
90fd87376d fixes #4163 2014-05-09 12:39:24 -07:00
Pieter Wuille
aca47d2a24 Merge src/leveldb changes for LevelDB 1.17. 2014-05-09 18:23:34 +02:00
Pieter Wuille
7cd0af7cc2 Move bignum.h to test/ 2014-05-09 17:56:16 +02:00
Pieter Wuille
ccc84e0963 Reduce bignum.h now it is only needed for scriptnum_tests 2014-05-09 17:38:44 +02:00
Wladimir J. van der Laan
605d5b5558
Merge pull request #4102
21bf3d2 Add tests for BoostAsioToCNetAddr (Wladimir J. van der Laan)
fdbd707 Remove unused function WildcardMatch (Wladimir J. van der Laan)
ee21912 rpc: Use netmasks instead of wildcards for IP address matching (Wladimir J. van der Laan)
e16be73 net: Add CSubNet class for subnet matching (Wladimir J. van der Laan)
d864275 Use new function parseint32 in SplitHostPort (Wladimir J. van der Laan)
0d4ea1c util: add parseint32 function with strict error reporting (Wladimir J. van der Laan)
2014-05-09 17:26:42 +02:00
Wladimir J. van der Laan
8bcfccbc2d
Merge pull request #4076
397668e Deduplicate uint* comparison operator logic (Pieter Wuille)
df9eb5e Move {Get,Set}Compact from bignum to uint256 (Pieter Wuille)
a703150 Add multiplication and division to uint160/uint256 (Pieter Wuille)
4d480c8 Exception instead of assigning 0 in case of wrong vector length (Pieter Wuille)
eb2cbd7 Deduplicate shared code between uint160 and uint256 (Pieter Wuille)
2014-05-09 17:03:51 +02:00
Wladimir J. van der Laan
82564e21e7
Merge pull request #4134
aa250f0 Remove NumBlocksOfPeers (Wladimir J. van der Laan)
2014-05-09 16:54:07 +02:00
Wladimir J. van der Laan
21bf3d257b Add tests for BoostAsioToCNetAddr 2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
fdbd7075ca Remove unused function WildcardMatch
No longer necessary after implementing netmask-based matching.
Also remove a longer-unused function `skipspaces`.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
ee21912510 rpc: Use netmasks instead of wildcards for IP address matching
`-rpcallowip` currently has a wacky wildcard-based format. After this
commit it will accept the more standard format, for example:

- Ranges with netmask 127.0.0.0/255.255.255.0, ::/0
- Ranges with cidr 12.3.4.5/24, 12:34:56:78:9a:bc:de:00/112
- Loose IPs ::1, 127.0.0.1

Trying to use the old *?-based format will result in an error message at
launch.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
e16be73753 net: Add CSubNet class for subnet matching 2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
d864275299 Use new function parseint32 in SplitHostPort
Use the new function parseint32 in SplitHostPort instead of calling
strtol directly.
2014-05-09 16:45:57 +02:00
Wladimir J. van der Laan
0d4ea1cf8a util: add parseint32 function with strict error reporting
None of the current integer parsing functions in util
check whether the result is valid and fits in the range
of the type. This is required for less sloppy error reporting.
2014-05-09 16:45:56 +02:00
Pieter Wuille
397668ea63 Deduplicate uint* comparison operator logic 2014-05-09 16:45:00 +02:00
Pieter Wuille
df9eb5e14f Move {Get,Set}Compact from bignum to uint256 2014-05-09 16:44:59 +02:00
Pieter Wuille
a7031507e6 Add multiplication and division to uint160/uint256 2014-05-09 16:39:48 +02:00
Pieter Wuille
4d480c8a3f Exception instead of assigning 0 in case of wrong vector length 2014-05-09 16:39:48 +02:00
Pieter Wuille
eb2cbd754d Deduplicate shared code between uint160 and uint256 2014-05-09 16:39:48 +02:00
Wladimir J. van der Laan
e443ed2462
Fix transaction tests
Conflict between low-s (6fd7ef2) and test updates in d3a33fc.
2014-05-09 16:35:30 +02:00
Wladimir J. van der Laan
72f754cf51
Merge pull request #3637
6fd7ef2 Also switch the (unused) verification code to low-s instead of even-s. (Pieter Wuille)
2014-05-09 16:24:57 +02:00
Wladimir J. van der Laan
54f102248b
Merge pull request #3843
787ee0c Check redeemScript size does not exceed 520 byte limit (Peter Todd)
4d79098 Increase IsStandard() scriptSig length (Peter Todd)
f80cffa Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails (Peter Todd)
6380180 Add rejection of non-null CHECKMULTISIG dummy values (Peter Todd)
29c1749 Let tx (in)valid tests use any SCRIPT_VERIFY flag (Peter Todd)
68f7d1d Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants (Peter Todd)
2014-05-09 16:09:20 +02:00
Wladimir J. van der Laan
1c0319bb2b
Merge pull request #3965
b1fdd54 script: Add test for CScriptNum (Cory Fields)
90320d6 script: add additional script tests (Cory Fields)
05e3ecf script: remove bignum dependency (Cory Fields)
4f497cd script: switch outside users to CScriptNum (Cory Fields)
27bff74 script: switch to CScriptNum usage for scripts (Cory Fields)
48d8eb1 script: add CScriptNum class (Cory Fields)
2014-05-09 16:03:07 +02:00
Wladimir J. van der Laan
d54985f3f1
Merge pull request #3884
942b33a Split AcceptBlockHeader from AcceptBlock. (Pieter Wuille)
f457347 Split up CheckBlock in a block and header version (Pieter Wuille)
2014-05-09 16:00:41 +02:00
Gavin Andresen
aaab675a78 Merge pull request #3860 from petertodd/test-checkmulti-n-m-zero
Test CHECKMULTISIG with m == 0 and/or n == 0
2014-05-09 10:00:16 -04:00
Wladimir J. van der Laan
da257a7b36
Merge pull request #4136
01ce711 [Qt] fix Qt slot problem in receivecoinsdialog (Philip Kaufmann)
2014-05-09 12:31:57 +02:00
Wladimir J. van der Laan
9b4b3cf9cf
qt: fix compile issue in Qt GUI
This was introduced in 3e1cf9b. Needs a cast to qint64.
2014-05-08 12:23:56 +02:00
David A. Harding
e0c06d2c49
Typo Fix In decoderawtransaction Help: s/txid/hex/
Help text appears to have been copy/pasted from getrawtransaction,
so it erroneously asked for a txid where rawtransaction hex should appear.

Remove lines which were copy/pasted from getrawtransaction but which
aren't displayed by decoderawtransaction.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 5cc0133 80c521e
Github-Pull: #4106
2014-05-08 11:49:02 +02:00
Wladimir J. van der Laan
0ecd8aae20
Merge pull request #4131
3e1cf9b add DEFAULT_TRANSACTION_FEE constant in wallet (Philip Kaufmann)
2014-05-08 10:48:07 +02:00
Wladimir J. van der Laan
69e264b6f8
Merge pull request #4141
9d558e1 ui: Check for !pixmap() before trying to export QR code (Wladimir J. van der Laan)
2014-05-08 10:32:14 +02:00
Peter Todd
787ee0c913 Check redeemScript size does not exceed 520 byte limit
redeemScripts >520bytes can't be spent due to the
MAX_SCRIPT_ELEMENT_SIZE limit; previously the addmultisigaddress and
createmultisig RPC calls would let you violate that limit unknowingly.

Also made the wallet code itself check the redeemScript prior to adding
it to the wallet, which in the (rare) instance that a user has added an
invalid oversized redeemScript to their wallet causes an error on
startup. The affected key isn't added to the wallet; other keys are
unaffected.
2014-05-08 00:55:01 -04:00
Peter Todd
4d79098ad5 Increase IsStandard() scriptSig length
Removes the limits on number of pubkeys for P2SH CHECKMULTISIG outputs.
Previously with the 500 byte scriptSig limit there were odd restrictions
where even a 1-of-12 P2SH could be spent in a standard transaction(1),
yet multisig scriptPubKey's requiring more signatures quickly ran out of
scriptSig space.

From a "stuff-data-in-the-blockchain" point of view not much has changed
as with the prior commit now only allowing the dummy value to be null
the newly allowed scriptSig space can only be used for signatures. In
any case, just using more outputs is trivial and doesn't cost much.

1) See 779b519480d8c5346de6e635119c7ee772e97ec872240c45e558f582a37b4b73
   Mined by BTC Guild.
2014-05-08 00:55:01 -04:00
Peter Todd
f80cffa213 Do not trigger a DoS ban if SCRIPT_VERIFY_NULLDUMMY fails 2014-05-08 00:55:01 -04:00
Peter Todd
6380180821 Add rejection of non-null CHECKMULTISIG dummy values
This is a source of transaction mutability as the dummy value was
previously not checked and could be modified to something other than the
usual OP_0 value.
2014-05-08 00:55:01 -04:00
Philip Kaufmann
4629f95b22
[Qt] fix ugly typo in bitcoin.cpp
Closes #4145.

Rebased-By: Wladimir J. van der Laan <laanwj@gmail.com>
Rebased-From: 1e4b083
2014-05-07 15:48:17 +02:00
Wladimir J. van der Laan
a475285a53
Add missing cs_main lock to VerifyDB
Fixes issue #4139.
2014-05-07 15:15:28 +02:00
Wladimir J. van der Laan
9d558e1c18 ui: Check for !pixmap() before trying to export QR code
Adds null pointer checks as well as prevents the Save/Copy context
menu from appearing at all if no image is shown.

Fixes issue #4140
2014-05-07 08:42:12 +02:00
Philip Kaufmann
bdc83e8f45 [Qt] ensure payment request network matches client network
- replaces checks in SendCoinsDialog::handlePaymentRequest() that belong
  to PaymentServer (normal URIs are special cased, as only an isValid
  check is done on BTC addresses)
- prevents the client to handle payment requests that do not match the
  clients network and shows an error instead (mainly a problem with
  drag&drop payment requests onto the client window)
- includes some small comment changes also
2014-05-06 21:20:00 +02:00
Wladimir J. van der Laan
acc2d2ca5f
Merge pull request #4127
d387b8e rpc: add `getblockchaininfo` and `getnetworkinfo` (Wladimir J. van der Laan)
2014-05-06 16:36:55 +02:00
Wladimir J. van der Laan
783b182c8f Remove dummy PRIszX macros for formatting
Size specifiers are no longer needed now that we use typesafe tinyformat
for string formatting, instead of the system's sprintf.

No functional changes.

This continues the work in #3735.
2014-05-06 15:29:16 +02:00
Philip Kaufmann
01ce711798 [Qt] fix Qt slot problem in receivecoinsdialog
- fixes error from debug.log:
  QMetaObject::connectSlotsByName: No matching signal for
  on_recentRequestsView_selectionChanged(QItemSelection,QItemSelection)
- small style fixes (e.g. alphabetical ordering if includes etc.)
- fixes #3992
2014-05-06 12:52:21 +02:00
Wladimir J. van der Laan
b733288d95
qt: periodic translations update 2014-05-06 12:21:26 +02:00
Wladimir J. van der Laan
aa250f0453 Remove NumBlocksOfPeers
Generally useless information. Only updates on connect time, not after
that. Peers can easily lie and the median filter is not effective in
preventing that.

In the past it was used for progress display in the GUI but
`CheckPoints::guessVerificationProgress` provides a better way that is now used.
It was too easy to mislead it. Peers do lie about it in practice, see issue #4065.

From the RPC, `getpeerinfo` gives the peer raw values, which are more
useful.
2014-05-06 11:09:19 +02:00
Wladimir J. van der Laan
d387b8ec15 rpc: add getblockchaininfo and getnetworkinfo
Adds two new info query commands that take over information from
hodge-podge `getinfo`.

Also some new information is added:
- `getblockchaininfo`
  - `chain`: (string) current chain (main, testnet3, regtest)
  - `verificationprogress: (numeric) estimated verification progress
  - `chainwork`
- `getnetworkinfo`
  - `localaddresses`: (array) local addresses, from mapLocalHost (fixes #1734)
2014-05-06 09:34:54 +02:00
Philip Kaufmann
3e1cf9b6f6 add DEFAULT_TRANSACTION_FEE constant in wallet
- as this is a shared Core/GUI setting, this makes it easier to keep them
  in sync (also no new includes are needed)
2014-05-05 20:54:00 +02:00
Peter Todd
29c17498a5 Let tx (in)valid tests use any SCRIPT_VERIFY flag
Previously only P2SH could be set.
2014-05-05 05:59:59 -04:00
Peter Todd
68f7d1d7af Create (MANDATORY|STANDARD)_SCRIPT_VERIFY_FLAGS constants 2014-05-05 05:35:27 -04:00
Wladimir J. van der Laan
d4ffe4e425
Merge pull request #4120
dbe8f75 don't use sed's -i option to stay posix compliant (Fabian Raetz)
2014-05-05 08:58:16 +02:00
Fabian Raetz
dbe8f75262 don't use sed's -i option to stay posix compliant
POSIX does not define sed's -i option. To stay as portable
as possible we should not relay on it.
2014-05-02 21:32:12 +02:00
Wladimir J. van der Laan
ab4bd3bdbb
Merge pull request #4119
2364b11 reorder includes to compile on OpenBSD (Fabian Raetz)
2014-05-02 21:31:31 +02:00
Fabian Raetz
2364b118f2 reorder includes to compile on OpenBSD
From getifaddr(3) manual:
"If both <net/if.h> and <ifaddrs.h> are being
included, <net/if.h> must be included before <ifaddrs.h>"

http://www.openbsd.org/cgi-bin/man.cgi?query=getifaddrs&apropos=0&sektion=0&manpath=OpenBSD+Current&arch=i386&format=html
2014-05-02 20:45:03 +02:00
Wladimir J. van der Laan
1ab62973d3
Merge pull request #4074
d3081fa Removed LevelDB changes (super3)
2014-05-02 20:36:26 +02:00
Wladimir J. van der Laan
3e578aa9b9
Merge pull request #4114
bfb154e Update build instructions for Berkeley DB (Wladimir J. van der Laan)
d0a2e2e Log BerkeleyDB version at startup (Wladimir J. van der Laan)
2014-05-02 18:14:39 +02:00
Philip Kaufmann
2fdd4c7933 better std::exception logging for CAddrDb
- also small logging text changes
2014-05-02 14:35:30 +02:00
Wladimir J. van der Laan
583df73acd
Merge pull request #4110
3a54ad9 Full translation update (Wladimir J. van der Laan)
9dd5d79 devtools: add a script to fetch and postprocess translations (Wladimir J. van der Laan)
58c01a3 qt: add transifex configuration file (Wladimir J. van der Laan)
2014-05-02 11:50:59 +02:00
Wladimir J. van der Laan
bf35cae1ae
Merge pull request #4115
e27c411 Remove build-time no-IPv6 setting (Wladimir J. van der Laan)
2014-05-02 10:27:27 +02:00
Wladimir J. van der Laan
83d7dc44ef
Merge pull request #4032
c0e0b05 Bugfix: configure: Look in libx32 subdirectory for boost libraries (Luke Dashjr)
2014-05-02 09:25:52 +02:00
super3
d3081fa231 Removed LevelDB changes
Syntax Highlighting
2014-05-01 12:10:06 -04:00
Wladimir J. van der Laan
e27c4110d9 Remove build-time no-IPv6 setting
The year is 2014. All supported operating systems have IPv6 support,
most certainly at build time (this doesn't mean that IPv6 is configured,
of course).

If noone is exercising the functionality to disable it, that means it
doesn't get tested, and IMO it's better to get rid of it.

(it's also not used consistently in RPC/boost and Net code...)
2014-05-01 12:15:36 +02:00
Wladimir J. van der Laan
3a54ad9aba Full translation update
Last update (48be9ce) missed quite a lot, for some reason.

This is also the first update done with the new script
`contrib/devtools/update-translations.py`
2014-05-01 10:16:06 +02:00
Wladimir J. van der Laan
d0a2e2eb87 Log BerkeleyDB version at startup
Prints the actual version of BerkeleyDB that is linked against, if
wallet support is enabled.

Useful for troubleshooting.

For example:

    2014-05-01 07:44:02 Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010)

    2014-05-01 07:54:25 Using BerkeleyDB version Berkeley DB 5.1.29: (October 25, 20 11)
2014-05-01 09:56:14 +02:00
Wladimir J. van der Laan
d69427a0c4
Merge pull request #4092
40c5b93 [Qt] Optionally add third party links to transaction context menu (Cozz Lovan)
2014-05-01 08:20:11 +02:00
Wladimir J. van der Laan
191b087e0e
Merge pull request #4109
6b29ccc Correct indentation (R E Broadley)
2014-05-01 08:09:20 +02:00
Philip Kaufmann
1cc7f54a8d use standard __func__ instead of __PRETTY_FUNCTION__ 2014-04-30 14:45:24 +02:00
R E Broadley
6b29ccc9f9 Correct indentation 2014-04-30 14:57:11 +08:00
Wladimir J. van der Laan
48be9ceaa0
qt: Periodic translations update
Update English translation from source code, and pull other translations
from Transifex.
2014-04-29 16:02:36 +02:00
Wladimir J. van der Laan
c63b2e25a5
Merge pull request #4043
d282c1f [Qt] catch Windows shutdown events while client is running (Philip Kaufmann)
2014-04-27 18:22:12 +02:00
Cozz Lovan
40c5b939f2 [Qt] Optionally add third party links to transaction context menu 2014-04-25 20:01:20 +02:00
Pieter Wuille
942b33a19d Split AcceptBlockHeader from AcceptBlock.
Also modify some connection logic to deal with non-full blocks in the index.
2014-04-25 00:35:58 +02:00
Pieter Wuille
f457347053 Split up CheckBlock in a block and header version 2014-04-25 00:33:13 +02:00
Simon de la Rouviere
0caf2b187f Add MESSAGE_START_SIZE from chainparams when loading blocks from external files. 2014-04-24 14:32:11 +02:00
Wladimir J. van der Laan
89bbd54fbf
Merge pull request #4085
b39a07d Add missing AssertLockHeld in ConnectBlock (Wladimir J. van der Laan)
41106a5 qt: get required locks upfront in polling functions (Wladimir J. van der Laan)
ed67100 Add required locks in tests (Wladimir J. van der Laan)
2014-04-23 17:06:28 +02:00
Wladimir J. van der Laan
b39a07dc42 Add missing AssertLockHeld in ConnectBlock 2014-04-23 09:07:18 +02:00
Wladimir J. van der Laan
41106a50d2 qt: get required locks upfront in polling functions
This avoids the GUI from getting stuck on
periodical polls if the core is holding the locks for a longer time -
for example, during a wallet rescan.
2014-04-23 09:07:18 +02:00
Wladimir J. van der Laan
ed67100565 Add required locks in tests
Unit tests with DEBUG_LOCKORDER were running into assertions.
2014-04-23 08:05:05 +02:00
Cozz Lovan
bb1f1c90d6 [Qt] importwallet progress 2014-04-23 01:50:25 +02:00