Commit Graph

5959 Commits

Author SHA1 Message Date
Wladimir J. van der Laan f6850d58f7
Merge pull request #6471
060b3d3 fixup: qt 5.5 snuck in another module that needs path hand-holding (Cory Fields)
ecd6a89 depends: make more qt flags explicit (Cory Fields)
ab67dd7 depends: bump to qt 5.5 (Cory Fields)
5189fe3 depends: split qt config options to separate lines (Jacob Welsh)
fe997df build: fix building against qt5.4/5.5 (Cory Fields)
2015-07-27 12:28:42 +02:00
Wladimir J. van der Laan bfd807ff32
Merge pull request #6456
ec249d4 util: use locale-independent parsing in ParseDouble (Wladimir J. van der Laan)
7650449 univalue: Avoid unnecessary roundtrip through double for numbers (Wladimir J. van der Laan)
e061e27 rpc: Make ValueFromAmount always return 8 decimals (Wladimir J. van der Laan)
2015-07-24 11:08:52 +02:00
Cory Fields fe997dfd12 build: fix building against qt5.4/5.5 2015-07-23 21:10:35 -04:00
Wladimir J. van der Laan d2464dfee9
Merge pull request #6287
a794284 locking: add a quick example of GUARDED_BY (Cory Fields)
2b890dd locking: fix a few small issues uncovered by -Wthread-safety (Cory Fields)
cd27bba locking: teach Clang's -Wthread-safety to cope with our scoped lock macros (Cory Fields)
2015-07-23 18:45:26 +02:00
Wladimir J. van der Laan d946e9a848
Merge pull request #5515
0fcc4e1 Assert on probable deadlocks if the second lock isnt try_lock (Matt Corallo)
2015-07-23 18:34:35 +02:00
Matt Corallo 0fcc4e1e04 Assert on probable deadlocks if the second lock isnt try_lock 2015-07-22 16:49:54 -07:00
Wladimir J. van der Laan 633fe10869
Merge pull request #6149
27d7605 Buffer log messages and explicitly open logs (Adam Weiss)
2015-07-22 18:24:20 +02:00
Wladimir J. van der Laan 45d1f5932b
Merge pull request #6381
c4973aa Chainparams: CTestNetParams and CRegTestParams extend directly from CChainParams (Jorge Timón)
d3cf546 Chainparams: Introduce CreateGenesisBlock() static function (Jorge Timón)
2015-07-21 13:29:16 +02:00
Wladimir J. van der Laan 24f6928192
Merge pull request #6400
1327897 Reformat help text of estimatefee and estimatepriority to match other help texts. (Pavel Janík)
2015-07-21 12:49:41 +02:00
Wladimir J. van der Laan 24ce77d775
Merge pull request #6444
0aad1f1 Exempt unspendable transaction outputs from dust checks (zathras-crypto)
2015-07-21 11:47:57 +02:00
Pavel Janík 1327897aee Reformat help text of estimatefee and estimatepriority to match other help texts. 2015-07-20 19:32:38 +02:00
Wladimir J. van der Laan 6d6b11e793
Merge pull request #6408
dca6040 [Qt] remove std namespace polution from code (Philip Kaufmann)
2015-07-20 18:00:32 +02:00
Pieter Wuille 9e38d0f745 Separate core memory usage computation in core_memusage.h 2015-07-20 11:17:53 -04:00
Wladimir J. van der Laan 89289d875d
Fix warning introduced by #6412
SOCKET are defined as unsigned integers, thus always >=0.
2015-07-20 17:10:02 +02:00
Wladimir J. van der Laan 1a2de3237f
Merge pull request #6412
d422f9b Test whether created sockets are select()able (Pieter Wuille)
2015-07-20 16:54:28 +02:00
Wladimir J. van der Laan dc51608c9c
Merge pull request #6447
2cb8ee9 remove unused inv from ConnectTip() (Pavel Vasin)
2015-07-20 16:43:07 +02:00
Simon Males 0ef9858707 Documenting pruned, pruneheight and softforks in getblockchaininfo 2015-07-19 14:07:35 +02:00
zathras-crypto 0aad1f13b2
Exempt unspendable transaction outputs from dust checks
Since unspendable outputs can't be spent, there is no threshold at which it would be uneconomic to spend them.

This primarily targets transaction outputs with `OP_RETURN`.

---

Initially based on:

commit 9cf0ae26350033d43d5dd3c95054c0d1b1641eda
Author: zathras-crypto <zathrasc@gmail.com>
Date:   Wed Mar 25 02:04:02 2015 -0700

Changes:

- cherry-picked on top of bitcoin:master
- added RPC test for fundrawtransaction
2015-07-18 17:31:55 +02:00
Wladimir J. van der Laan ec249d4a1d util: use locale-independent parsing in ParseDouble
Use locale-indepent C++ based parsing instead of C's strtod,
which checks for different input based on the user's locale.
Fixes #6443.
2015-07-18 09:04:18 +02:00
Wladimir J. van der Laan 7650449a67 univalue: Avoid unnecessary roundtrip through double for numbers
JSON makes no distinction between numbers and reals, and our code
doesn't need to do so either.

This removes VREAL, as well as its specific post-processing in
`UniValue::write`. Non-monetary amounts do not need to be forcibly
formatted with 8 decimals, so the extra roundtrip was unnecessary
(and potentially loses precision).
2015-07-18 09:04:18 +02:00
Wladimir J. van der Laan e061e2778d rpc: Make ValueFromAmount always return 8 decimals
This is the format that was always returned to JSON clients.
The difference was not noticed before, because VREAL values
are post-processed by univalue.

By implementing the functionality directly it breaks the dependency
of rpcserver on utilmoneystr. FormatMoney is now only used for debugging
purposes.

To test, port over the formatting tests from util_tests.cpp to
rpc_tests.cpp.
2015-07-18 09:03:59 +02:00
Philip Kaufmann dca6040a86 [Qt] remove std namespace polution from code 2015-07-16 11:54:28 +02:00
Pavel Vasin 2cb8ee9ac7 remove unused inv from ConnectTip() 2015-07-16 12:31:36 +03:00
Wladimir J. van der Laan ed789ceade
Merge pull request #6438
d4b1d5a openssl: avoid config file load/race (Cory Fields)
2015-07-15 15:49:45 +02:00
Wladimir J. van der Laan ce183dce2e
qt: update forgotten emit to Q_EMIT in macdockiconhandler.mm
Leftover from #6433
2015-07-15 15:09:31 +02:00
Wladimir J. van der Laan d29ec6c230 qt: define QT_NO_KEYWORDS
QT_NO_KEYWORDS prevents Qt from defining the `foreach`, `signals`,
`slots` and `emit` macros.

Avoid overlap between Qt macros and boost - for example #undef hackiness
in #6421.
2015-07-15 07:30:23 +02:00
Cory Fields d4b1d5a8ba openssl: avoid config file load/race 2015-07-14 17:54:04 -04:00
Wladimir J. van der Laan 71cbeaad9a rpc: Implement random-cookie based authentication
When no `-rpcpassword` is specified, use a special 'cookie' file for
authentication. This file is generated with random content when the
daemon starts, and deleted when it exits. Read access to this file
controls who can access through RPC. By default this file is stored in
the data directory but it be overriden with `-rpccookiefile`.

This is similar to Tor CookieAuthentication: see
https://www.torproject.org/docs/tor-manual.html.en

Alternative to #6258. Like that pull, this allows running bitcoind
without any manual configuration. However, daemons should ideally never write to
their configuration files, so I prefer this solution.
2015-07-13 13:11:41 +02:00
Wladimir J. van der Laan 3d9362d5ac
Merge pull request #6398
85ee55b rpc: Remove chain-specific RequireRPCPassword (Wladimir J. van der Laan)
2015-07-13 12:55:06 +02:00
Jorge Timón c4973aaaf6 Chainparams: CTestNetParams and CRegTestParams extend directly from CChainParams
...instead of CMainParams and CTestNetParams respectively

Do the same for CBaseChainParams.
The inheritance was only reducing readibility in this case
2015-07-12 11:13:47 +02:00
Jorge Timón d3cf546ec2 Chainparams: Introduce CreateGenesisBlock() static function 2015-07-12 11:03:06 +02:00
Wladimir J. van der Laan 7cdefb927e
Merge pull request #6410
5098c47 Implement accurate memory accounting for mempool (Pieter Wuille)
2015-07-11 15:47:43 +02:00
Pieter Wuille d422f9b1fd Test whether created sockets are select()able 2015-07-10 12:05:09 -04:00
Wladimir J. van der Laan fac21df5f0
Merge pull request #6370
6ebac07 Remove ChainParams::DefaultMinerThreads (Wladimir J. van der Laan)
2015-07-10 17:12:40 +02:00
Wladimir J. van der Laan c52e8b300a
Merge pull request #6379
9cc9152 rpc: Accept scientific notation for monetary amounts in JSON (Wladimir J. van der Laan)
2015-07-10 16:50:46 +02:00
Pieter Wuille 5098c47b24 Implement accurate memory accounting for mempool 2015-07-10 10:49:31 -04:00
Wladimir J. van der Laan 9cc91523db rpc: Accept scientific notation for monetary amounts in JSON
Add a function `ParseFixedPoint` that parses numbers according
to the JSON number specification and returns a 64-bit integer.

Then this in `AmountFromValue`, rather than `ParseMoney`.

Also add lots of tests (thanks to @jonasschnelli for some of them).

Fixes issue #6297.
2015-07-10 15:43:26 +02:00
Wladimir J. van der Laan 943b322d5d
Merge pull request #5486
c45c7ea [REST] add JSON support for /rest/headers/ (Jonas Schnelli)
2015-07-10 15:25:51 +02:00
Wladimir J. van der Laan 445220544e
Merge pull request #5288
e3cae52 Added -whiteconnections=<n> option (Josh Lehan)
2015-07-10 15:07:15 +02:00
Wladimir J. van der Laan 85ee55b5c3 rpc: Remove chain-specific RequireRPCPassword
I've never liked the chain-specific exception to having to set a
password. It gives issues with #6388 which makes it valid to
set no password in every case (as it enables random cookie authentication).

This pull removes the flag, so that all chains are regarded the same.

It also removes the username==password test, which doesn't provide any
substantial extra security.
2015-07-10 15:01:55 +02:00
Wladimir J. van der Laan 708037fcc7
Merge pull request #6384
15e26a6 qt: Force TLS1.0+ for SSL connections (Wladimir J. van der Laan)
2015-07-10 15:00:01 +02:00
Wladimir J. van der Laan 7fc25c2e5d
Merge pull request #6368
cb54d17 CLTV: Add more tests to improve coverage (Esteban Ordano)
2015-07-09 11:20:17 +02:00
Wladimir J. van der Laan aa565327ec
Merge pull request #6378
5e058e7 [Qt] constify foreach uses where possible (Philip Kaufmann)
2015-07-09 10:54:21 +02:00
Wladimir J. van der Laan 11576a57d2
Merge pull request #6387
65ce021 [bitcoin-cli] improve error output (Jonas Schnelli)
2015-07-08 13:39:57 +02:00
Wladimir J. van der Laan 133601f6a5 tests: Fix bitcoin-tx signing testcase
Fixes wrong scriptPubkey problem, which caused the transaction to
not actually be signed.
2015-07-07 18:26:38 +02:00
Jonas Schnelli 65ce0215a4 [bitcoin-cli] improve error output 2015-07-07 17:25:56 +02:00
Philip Kaufmann 5e058e7417 [Qt] constify foreach uses where possible
- this doesn't replace BOOST_FOREACH, it just makes used arguments const
  where possible
2015-07-07 06:53:43 +02:00
Adam Weiss 27d7605804 Buffer log messages and explicitly open logs
Prevents stomping on debug logs in datadirs that are locked by other
instances and lost parameter interaction messages that can get wiped by
ShrinkDebugFile().

The log is now opened explicitly and all emitted messages are buffered
until this open occurs.  The version message and log cut have also been
moved to the earliest possible sensible location.
2015-07-06 21:54:31 -04:00
Esteban Ordano cb54d17355 CLTV: Add more tests to improve coverage
Four cases included:

* The CLTV operand type mismatches the tx locktime. In the script it is
  1 (interpreted as block height), but in the tx is 500000000
  (interpreted as date)
* The stack is empty when executing OP_CLTV
* The tx is final by having only one input with MAX_INT sequence number
* The operand for CLTV is negative (after OP_0 OP_1 OP_SUB)
2015-07-06 13:09:37 -07:00
Wladimir J. van der Laan 15e26a6a9a qt: Force TLS1.0+ for SSL connections 2015-07-06 20:06:16 +02:00