Commit graph

6292 commits

Author SHA1 Message Date
Zak Wilcox
6b407e4e56 -datadir is now allowed in config files 2014-07-12 02:05:09 +01:00
Pieter Wuille
d4d3fbd828 Do not flush the cache after every block outside of IBD 2014-07-11 16:44:53 +02:00
Wladimir J. van der Laan
d3165ed35a
Merge pull request #4347
6c37f7f `getrawchangeaddress` should fail when keypool exhausted (Wladimir J. van der Laan)
2014-07-11 15:34:27 +02:00
Wladimir J. van der Laan
6c37f7fd78 getrawchangeaddress should fail when keypool exhausted
An user on IRC reported an issue where `getrawchangeaddress`
keeps returning a single address when the keypool is exhausted.
In my opinion this is strange behaviour.

- Change CReserveKey to fail when running out of keys in the keypool.
- Make `getrawchangeaddress` return RPC_WALLET_KEYPOOL_RAN_OUT when
  unable to create an address.
- Add a Python RPC test for checking the keypool behaviour in combination
  with encrypted wallets.
2014-07-11 15:24:29 +02:00
Wladimir J. van der Laan
6ad2c2402e
Merge pull request #4507
b60be6b Clean up RPCs that are disabled in safe-mode. (Gregory Maxwell)
2014-07-11 15:16:33 +02:00
Wladimir J. van der Laan
b45a6e8394 Add test for getblocktemplate longpolling 2014-07-11 14:48:16 +02:00
Luke Dashjr
ff6a7af154 getblocktemplate: longpolling support 2014-07-11 14:48:02 +02:00
Wladimir J. van der Laan
f0fc81a083
Merge pull request #4501
954d2e7 Avoid a segfault on getblock if it can't read a block from disk. (Ruben Dario Ponticelli)
2014-07-11 05:02:15 +02:00
Gregory Maxwell
b60be6be4a Clean up RPCs that are disabled in safe-mode.
This removes some inconsistencies in what worked and didn't work in
 safemode. Now only RPCs involved in getting balances or sending
 funds are disabled.

Previously you could mine but not submit blocks— but we may need more
 blocks to resolve a fork that triggered safe mode in the first place,
 and the non-submission was not reliable since some miners submit
 blocks via multiple means. There were also a number of random commands
 disabled that had nothing to do with the blockchain like verifymessage.

Thanks to earlz for pointing out that there were some moderately cheap
 ways to maliciously trigger safe mode, which brought attention to
 the fact that safemode wasn't used in a very intelligent way.
2014-07-10 10:35:48 -07:00
Wladimir J. van der Laan
f2286a69a9
Merge pull request #4190
502972f Fix Error: No file at @loader_path/libboost_system-mt.dylib (Federico Bond)
2014-07-10 08:04:59 +02:00
Ruben Dario Ponticelli
954d2e7201
Avoid a segfault on getblock if it can't read a block from disk. 2014-07-10 00:34:18 -03:00
Federico Bond
502972f16b Fix Error: No file at @loader_path/libboost_system-mt.dylib 2014-07-09 20:50:30 -03:00
Pieter Wuille
dc942e6f27 Introduce whitelisted peers.
This adds a -whitelist option to specify subnet ranges from which peers
that connect are whitelisted. In addition, there is a -whitebind option
which works like -bind, except peers connecting to it are also
whitelisted (allowing a separate listen port for trusted connections).

Being whitelisted has two effects (for now):
* They are immune to DoS disconnection/banning.
* Transactions they broadcast (which are valid) are always relayed,
  even if they were already in the mempool. This means that a node
  can function as a gateway for a local network, and that rebroadcasts
  from the local network will work as expected.

Whitelisting replaces the magic exemption localhost had for DoS
disconnection (local addresses are still never banned, though), which
implied hidden service connects (from a localhost Tor node) were
incorrectly immune to DoS disconnection as well. This old
behaviour is removed for that reason, but can be restored using
-whitelist=127.0.0.1 or -whitelist=::1 can be specified. -whitebind
is safer to use in case non-trusted localhost connections are expected
(like hidden services).
2014-07-09 20:40:14 +02:00
Gavin Andresen
f3330b40a5 Merge pull request #4485 from gavinandresen/refactor_python_tests
Refactor common RPC test code to BitcoinTestFramework base class
2014-07-09 11:34:16 -04:00
Wladimir J. van der Laan
e28c1ae75d
Merge pull request #4428
00d1980 init.cpp: log fee estimates filename on error (Philip Kaufmann)
2014-07-09 16:50:58 +02:00
Wladimir J. van der Laan
4856f4c396
Merge pull request #4486
45abeb2 Update Debian packaging description for new bitcoin-cli (Johnathan Corgan)
2014-07-09 16:45:23 +02:00
Gavin Andresen
f5a92bf9bd
Print better errors, and add util stop_node() function. 2014-07-09 10:19:46 -04:00
Gavin Andresen
e8097f7df1
Refactor common RPC test code to BitcoinTestFramework base class
Inspired by #3956, with a little more flexibility built in.

I didn't touch rpcbind_test.py, because it only runs on Linux.
2014-07-09 10:19:26 -04:00
Gavin Andresen
ae28a7c72d Merge pull request #4489 from gavinandresen/python_bitcoinrpc_update
Improved bitcoinrpc logging and Decimal support
2014-07-09 10:18:34 -04:00
Wladimir J. van der Laan
52a7d52ffb
Merge pull request #4340
33cc907 Add DNS seed of open-nodes.org (kevin)
2014-07-09 12:00:16 +02:00
Philip Kaufmann
4eedf4ffee make RandAddSeed() use OPENSSL_cleanse()
- removes the cstring include and is also used in RandAddSeedPerfmon()
2014-07-09 09:43:55 +02:00
Philip Kaufmann
6354935c48 move rand functions from util to new random.h/.cpp 2014-07-09 09:42:19 +02:00
Philip Kaufmann
001a53d742 add GetRandBytes() as wrapper for RAND_bytes()
- add a small wrapper in util around RAND_bytes() and replace with
  GetRandBytes() in the code to log errors from calling RAND_bytes()
- remove OpenSSL header rand.h where no longer needed
2014-07-09 09:42:18 +02:00
Philip Kaufmann
00d1980b8f init.cpp: log fee estimates filename on error
- small changes to Shutdown(), buffer __func__, which is now used in
  all LogPrintf() calls and format for better readability
- order using namespace alpabetically
2014-07-09 09:22:36 +02:00
Wladimir J. van der Laan
2ee918d121
Merge pull request #4275
509f926 Payment request parsing on startup now only changes network if a valid network name is specified. (Ross Nicoll)
2014-07-09 08:47:16 +02:00
Wladimir J. van der Laan
f51816f425
Merge pull request #4490
575e70c build: fix win32 static linking after libtool merge (Cory Fields)
9a427da build: re-add AM_LDFLAGS where it's overridden (Cory Fields)
2014-07-09 08:45:17 +02:00
Ross Nicoll
509f926e80 Payment request parsing on startup now only changes network if a valid network name is specified. 2014-07-08 22:10:46 +01:00
Cory Fields
575e70c0c6 build: fix win32 static linking after libtool merge
Libtool eats the -static flag rather than passing it along to the compiler. To
get the same effect, -all-static is used instead.
2014-07-08 15:53:53 -04:00
Cory Fields
9a427da116 build: re-add AM_LDFLAGS where it's overridden
using _LDFLAGS replaces AM_LDFLAGS rather than adding to it.
2014-07-08 15:52:29 -04:00
Gavin Andresen
1b2bc71de1
Improved logging and Decimal support 2014-07-08 14:31:13 -04:00
Johnathan Corgan
45abeb2112 Update Debian packaging description for new bitcoin-cli 2014-07-08 09:09:42 -07:00
Wladimir J. van der Laan
418d4ad110
Merge pull request #4479
109849e Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer (Luke Dashjr)
2014-07-08 13:35:56 +02:00
Wladimir J. van der Laan
7d05645693
Merge pull request #4465
d88af56 Fee fixes (Cozz Lovan)
2014-07-08 09:22:24 +02:00
Cozz Lovan
d88af56011 Fee fixes 2014-07-08 05:09:19 +02:00
Wladimir J. van der Laan
1fedd65fcf
Merge pull request #4480
2227725 test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibility (Luke Dashjr)
2014-07-07 18:24:04 +02:00
Luke Dashjr
2227725fcb test/bloom_tests: Use UL suffix for unsigned long number to ensure compatibility 2014-07-07 15:42:59 +00:00
Luke Dashjr
109849e204 Bugfix: strerror_r can return an error, and if it does, POSIX does not specify the content of the buffer 2014-07-07 15:34:00 +00:00
Wladimir J. van der Laan
c6ac5fcfc2
Merge pull request #4471
40f5cb8 Send rejects and apply DoS scoring for errors in direct block validation. (Pieter Wuille)
2014-07-07 17:31:05 +02:00
Wladimir J. van der Laan
f748ff730b
Merge pull request #4045
a3e192a replaced MINE_ with ISMINE_ (JaSK)
53a2148 fixed bug where validateaddress doesn't display information (JaSK)
f28707a fixed bug in ListReceived() (JaSK)
519dd1c Added MINE_ALL = (spendable|watchonly) (JaSK)
23b0506 Fixed some stuff in TransactionDesc (JaSK)
80dda36 removed default argument values for ismine filter (JaSK)
d5087d1 Use script matching rather than destination matching for watch-only. (Pieter Wuille)
0fa2f88 added includedWatchonly argument to listreceivedbyaddress/...account (JaSK)
f87ba3d added includeWatchonly argument to 'gettransaction' because it affects balance calculation (JaSK)
a5c6c5d fixed tiny glitch and improved readability like laanwj suggested (JaSK)
d7d5d23 Added argument to listtransactions and listsinceblock to include watchonly addresses (JaSK)
952877e Showing 'involvesWatchonly' property for transactions returned by 'listtransactions' and 'listsinceblock'. It is only appended when the transaction involves a watchonly address. (JaSK)
83f3543 Added argument to listaccounts to include watchonly addresses (JaSK)
d4640d7 Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. (JaSK)
d2692f6 Watchonly transactions are marked in transaction history (JaSK)
ffd40da Watchonly balances are shown separately in gui. (JaSK)
2935b21 qt: Hide unspendable outputs in coin control (Wladimir J. van der Laan)
c898846 Add support for watch-only addresses (Pieter Wuille)
2014-07-07 16:06:28 +02:00
Wladimir J. van der Laan
afe380ef0f
Fix the build for windows
Problem introduced in caf6150. Thanks to @drak for noticing. Fixes #4473.
2014-07-07 12:48:56 +02:00
Wladimir J. van der Laan
4252f2928b
Merge pull request #4327
a339a37 error out, when we detect -socks argument (Philip Kaufmann)
0127a9b remove SOCKS4 support from core and GUI (Philip Kaufmann)
2014-07-07 12:45:28 +02:00
Wladimir J. van der Laan
0aa1d106e8
Merge pull request #4477
18c7ba8 Add translation mailing list to README.md (Michael Ford)
2014-07-07 10:43:18 +02:00
Wladimir J. van der Laan
88ae36bc06
Merge pull request #4466
ad87bc4 [Qt] Replace status bar unit icon with actual images (Cozz Lovan)
2014-07-07 10:42:53 +02:00
Wladimir J. van der Laan
1132cdbff3
Merge pull request #4401
cf04d83 add OpenSSL RAND_cleanup() on OpenSSL shutdown (Philip Kaufmann)
2014-07-07 10:35:26 +02:00
Michael Ford
18c7ba8d99 Add translation mailing list to README.md
Link to the new translation mailing list from README.md
2014-07-07 16:32:38 +08:00
Wladimir J. van der Laan
642c8e75bc
Merge pull request #4399
674c070 [Qt] seed OpenSSL PNRG with Windows event data (Philip Kaufmann)
2014-07-07 10:31:33 +02:00
Wladimir J. van der Laan
ebb37a417a
Merge pull request #4373
2ec5a3d rpc: Prevent easy memory exhaustion attack (Wladimir J. van der Laan)
2014-07-07 10:30:06 +02:00
Wladimir J. van der Laan
4851d09603
Merge pull request #4446
209377a Use GetBlockTime() more (jtimon)
2014-07-07 10:29:10 +02:00
Wladimir J. van der Laan
5e1b7a23b0
Merge pull request #4470
f4b00be Add CChain::GetLocator() unit test (Pieter Wuille)
3c85d2e Fix CChain::GetLocator (Pieter Wuille)
2014-07-07 10:28:09 +02:00
Wladimir J. van der Laan
bc06e8f402
Merge pull request #4463
e832ab7 Rename SendMoneyToDestination to SendMoney. (Daniel Kraft)
2014-07-07 10:22:58 +02:00