Commit graph

8845 commits

Author SHA1 Message Date
Wladimir J. van der Laan
08e9c57ba2
Merge pull request #6077
517e6dd Unit test doublespends in new blocks (Gavin Andresen)
17b1142 Cache transaction validation successes (Pieter Wuille)
2015-07-27 16:31:07 +02:00
Gavin Andresen
517e6dd256 Unit test doublespends in new blocks
As suggested by Greg Maxwell-- unit test to make sure a block
with a double-spend in it doesn't pass validation if half of
the double-spend is already in the memory pool (so full-blown
transaction validation is skipped) when the block is received.
2015-07-27 15:50:21 +02:00
Pieter Wuille
17b11428c1 Cache transaction validation successes 2015-07-27 15:28:43 +02:00
Wladimir J. van der Laan
c6455c77ab doc: mention change to option parsing behavior in release notes 2015-07-27 14:55:15 +02:00
Wladimir J. van der Laan
c38c49d0b7 Fix argument parsing oddity with -noX
`bitcoind -X -noX` ends up, unintuitively, with `X` set.
(for all boolean options X)

This result is due to the odd two-pass processing of arguments. This
patch fixes this oddity and simplifies the code at the same time.
2015-07-27 14:47:54 +02:00
Wladimir J. van der Laan
ca37e0f339
Merge pull request #5697
60c8bac Includes: Cleanup around net main and wallet (Jorge Timón)
9dd793f TRIVIAL: Missing includes (Jorge Timón)
2015-07-27 14:40:29 +02:00
Wladimir J. van der Laan
240b30eaf0
Merge pull request #6380
9127e97 doc: Mention RPC strings for monetary amounts in release notes (Wladimir J. van der Laan)
7d226b7 [QA] add testcases for parsing strings as values (Jonas Schnelli)
614601b rpc: Accept strings in AmountFromValue (Wladimir J. van der Laan)
2015-07-27 14:22:42 +02:00
Wladimir J. van der Laan
9127e9766a doc: Mention RPC strings for monetary amounts in release notes
Add a section "low level RPC API changes" so that the changes with
regard to error codes can be added later.
2015-07-27 13:57:24 +02:00
Jonas Schnelli
7d226b7ca0 [QA] add testcases for parsing strings as values 2015-07-27 13:55:46 +02:00
Wladimir J. van der Laan
614601be8f rpc: Accept strings in AmountFromValue
Accept strings containing decimal values, in addition to bare values.

Useful from JSON-RPC implementations where it's not possible to have
direct control over the text of numbers (e.g. where numbers are always
doubles), and it's still desired to send an exact value.

This would allow users to post JSON content with numbers encoded like
`{"value": "0.00000001"}` instead of `{"value": 0.00000001}` which some
php/python encoders wrap into 1e-8, or worse.
2015-07-27 13:55:46 +02:00
Wladimir J. van der Laan
d43297c5ba
Merge pull request #6468
6f8b6d3 don't try to decode invalid encoded ext keys (Jonas Schnelli)
8d2af54 extend bip32 tests to cover Base58c/CExtKey decode (Jonas Schnelli)
7cb1f9f fix and extend CBitcoinExtKeyBase template (Jonas Schnelli)
2015-07-27 13:20:54 +02:00
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
Cory Fields
060b3d377b fixup: qt 5.5 snuck in another module that needs path hand-holding 2015-07-27 12:25:28 +02:00
Cory Fields
ecd6a89381 depends: make more qt flags explicit 2015-07-27 12:25:28 +02:00
Jonas Schnelli
6f8b6d339b don't try to decode invalid encoded ext keys 2015-07-25 09:51:52 +02:00
Philip Kaufmann
ed166dfa82 [Qt] allow users to set -onion via GUI
- also allow users to see, if the default proxy (-proxy) is used for
  reaching peers via IPv6 or Tor
2015-07-24 12:28:06 +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
Wladimir J. van der Laan
410fd7448a
Merge pull request #6465
56b28fc Don't share objects between TestInstances (Casey Rodarmor)
2015-07-24 10:59:45 +02:00
Cory Fields
ab67dd7818 depends: bump to qt 5.5 2015-07-23 21:10:35 -04:00
Jacob Welsh
5189fe3d88 depends: split qt config options to separate lines
Helps ease of reading and comparison. Removed some duplicates.
2015-07-23 21:10:35 -04:00
Cory Fields
fe997dfd12 build: fix building against qt5.4/5.5 2015-07-23 21:10:35 -04:00
Jorge Timón
60c8bac77c Includes: Cleanup around net main and wallet
-Move from .h to .cpp: in main, net and wallet
-Remove unnecessary #include "main.h"
-Cleanup some wallet files includes
2015-07-23 21:10:26 +02:00
Jorge Timón
9dd793f499 TRIVIAL: Missing includes 2015-07-23 21:10:22 +02: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
Jonas Schnelli
8d2af54ecc extend bip32 tests to cover Base58c/CExtKey decode 2015-07-23 16:32:31 +02:00
Jonas Schnelli
7cb1f9f7eb fix and extend CBitcoinExtKeyBase template
- fix Decode call (req. only one param)
- add constructor for base58c->CExtKey
2015-07-23 16:32:21 +02:00
Matt Corallo
0fcc4e1e04 Assert on probable deadlocks if the second lock isnt try_lock 2015-07-22 16:49:54 -07:00
Ross Nicoll
c433828df9 Handle no chain tip available in InvalidChainFound()
Handle the case where no chain tip is available, in InvalidChainFound(). This fixes a null pointer deference when running unit tests, if the genesis block or block validation code is broken.
2015-07-22 21:10:09 +00: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
Casey Rodarmor
56b28fca46 Don't share objects between TestInstances 2015-07-22 12:03:16 -04: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
Wladimir J. van der Laan
8fe5cce3d5
Merge pull request #6453
9e38d0f Separate core memory usage computation in core_memusage.h (Pieter Wuille)
2015-07-20 17:57:37 +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
Wladimir J. van der Laan
3c923e8975
Merge pull request #6457
0ef9858 Documenting pruned, pruneheight and softforks in getblockchaininfo (Simon Males)
0c89579 Include pruned state in chaininfo.json (Simon Males)
2015-07-20 10:49:02 +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
Simon Males
0c895799c8 Include pruned state in chaininfo.json 2015-07-18 10:32:09 +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
Wladimir J. van der Laan
dcc495e011
Merge pull request #6372
e3c4297 Update Linearize tool to support Windows paths (Paul Georgiou)
2015-07-17 22:02:45 +02:00
Wladimir J. van der Laan
fe3fe547f7
Merge pull request #6439
09d4ddf Updated URL location of netinstall for Debian (฿tcDrak)
2015-07-17 09:01:11 +02:00