Commit graph

5756 commits

Author SHA1 Message Date
Wladimir J. van der Laan
bfae70aae6
Merge pull request #4129
d56e30c removed a few unnecessary casts (Kamil Domanski)
3e74ac2 json_spirit: #include <stdint.h> (Kamil Domanski)
4b61a6a switch from boost int types to <stdint.h> (Kamil Domanski)
2014-05-13 11:45:20 +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
29c1fbbb97
Merge pull request #3695
b5ad5e7 Add Python test for -rpcbind and -rpcallowip (Wladimir J. van der Laan)
f923c07 Support IPv6 lookup in bitcoin-cli even when IPv6 only bound on localhost (Wladimir J. van der Laan)
deb3572 Add -rpcbind option to allow binding RPC port on a specific interface (Wladimir J. van der Laan)
2014-05-13 08:09:25 +02:00
Wladimir J. van der Laan
b5ad5e783d Add Python test for -rpcbind and -rpcallowip
Add a new test, `rpcbind_test.py`, that extensively tests the new
`-rpcbind` functionality.
2014-05-13 07:23:23 +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
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
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
381b25dfde doc: remove mention of -rpctimeout from man page
That option hasn't existed for a long time.
2014-05-12 09:30:46 +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
Wladimir J. van der Laan
2e2f6855df
Merge pull request #4175
283e405 Switch stdout to line buffering (shshshsh)
2014-05-12 08:24:04 +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
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
Jeff Garzik
ceb0757a3e Merge pull request #4164 from mbogosian/master
fixes #4163 (lockunspent help docs are (partially) wrong)
2014-05-10 01:04:38 -04:00
Pieter Wuille
f6b7c644c9 Move base58.h implementation code to base58.cpp 2014-05-10 00:42:31 +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
938b689846 Squashed 'src/leveldb/' changes from 9094c7f..7924331
42dcc7e Merge upstream LevelDB 1.17.
e353fbc Release LevelDB 1.17
269fc6c Release LevelDB 1.16
REVERT: 9094c7f Temporarily revert to writing .sst files instead of .ldb

git-subtree-dir: src/leveldb
git-subtree-split: 79243314e40ac31d79c68e5658a1d6a64800d50b
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
8b542d5874
Merge pull request #4155
b1f0be0 build: fix: remove error output (harry)
2014-05-09 12:32:21 +02:00