Commit Graph

4155 Commits

Author SHA1 Message Date
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
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
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
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 52a7d52ffb
Merge pull request #4340
33cc907 Add DNS seed of open-nodes.org (kevin)
2014-07-09 12:00:16 +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
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
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
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 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
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
jtimon 209377a7cb Use GetBlockTime() more 2014-07-07 10:20:28 +02:00
Wladimir J. van der Laan 6654a87e7b
Merge pull request #4462
3d0e92d [Qt] remove dup includes in bitcoingui (Philip Kaufmann)
2014-07-07 10:16:31 +02:00
Wladimir J. van der Laan 4ea8f632fe
Merge pull request #4467
1f740dd Remove unused variable (R E Broadley)
2014-07-07 10:14:10 +02:00
Wladimir J. van der Laan 73ac7abd08 Move ui_interface to bitcoin_server.a
There is no need for it in the utility libraries or tools.
Put it in init.cpp, and in the tests separately (as they can't link init).
2014-07-07 09:58:56 +02:00
Wladimir J. van der Laan 509030344c qt: Pick translation messages only from necessary files
Utility libraries (common, util) as well as extra tools shouldn't be
parsed for translation messages, only the server and wallet part qualify
here.
2014-07-07 09:57:37 +02:00
Daniel Kraft e832ab7754 Rename SendMoneyToDestination to SendMoney.
Get rid of SendMoney and replace it by the functionality of
SendMoneyToDestination.  This cleans up the code, since only
SendMoneyToDestination was actually used (SendMoney internally from this
routine).
2014-07-07 09:41:33 +02:00
Philip Kaufmann a339a37b28 error out, when we detect -socks argument 2014-07-07 08:15:14 +02:00
Philip Kaufmann 0127a9be14 remove SOCKS4 support from core and GUI
- now we support SOCKS5 only
2014-07-07 08:15:14 +02:00
Wladimir J. van der Laan 4ed2315e86
Merge pull request #4457
834e46e CBlockIndex()::SetNull() method to avoid code repetition (jtimon)
2014-07-07 07:44:48 +02:00
Wladimir J. van der Laan e1f7c7d173
Merge pull request #4472
9f4da19 Use pong receive time rather than processing time (Pieter Wuille)
2014-07-07 06:28:43 +02:00
Pieter Wuille 9f4da19bab Use pong receive time rather than processing time 2014-07-06 16:08:18 +02:00
Pieter Wuille 40f5cb878e Send rejects and apply DoS scoring for errors in direct block validation.
75f51f2a introduced asynchronous processing for blocks, where reject messages
and DoS scoring could be applied outside of ProcessBlock, because block
validation may happen later.

However, some types of errors are still detected immediately (in particular,
CheckBlock violations), which need acting after ProcessBlock returns.
2014-07-06 14:47:23 +02:00
Pieter Wuille f4b00beae5 Add CChain::GetLocator() unit test 2014-07-06 14:40:31 +02:00
Pieter Wuille 3c85d2ec37 Fix CChain::GetLocator 2014-07-06 13:42:29 +02:00
R E Broadley 1f740ddc4d Remove unused variable 2014-07-05 22:43:52 +07:00
Cozz Lovan ad87bc4de1 [Qt] Replace status bar unit icon with actual images 2014-07-05 17:18:26 +02:00
Philip Kaufmann 674c070e5d [Qt] seed OpenSSL PNRG with Windows event data
- see https://bitcointalk.org/index.php?topic=113496.msg1228193#msg1228193
  for the initial suggestion for this
- also ensure consistent debug.log message format
2014-07-04 17:16:36 +02:00
Philip Kaufmann 3d0e92dc83 [Qt] remove dup includes in bitcoingui 2014-07-04 16:51:25 +02:00
Wladimir J. van der Laan 2ec5a3d212
rpc: Prevent easy memory exhaustion attack
Allocate memory for POST message data only as bytes come in, instead of
all at once at the beginning.

Fixes #4343.
2014-07-04 09:20:39 +02:00
Wladimir J. van der Laan e81e2e8f7c
Merge pull request #4421
caf6150 Use async name resolving to improve net thread responsiveness (Huang Le)
2014-07-04 08:40:01 +02:00
Wladimir J. van der Laan 00fa78c35b
Merge pull request #3764
2e36866 Show nodeid instead of addresses (for anonymity) unless otherwise requested. (R E Broadley)
2014-07-04 08:04:30 +02:00
Wladimir J. van der Laan e61c6d69ad
Merge pull request #4450
0da6b3f Remove signal DoubleSpendDetected, use function (Tom Harding)
88dd359 Check signatures before respend relay (Tom Harding)
2014-07-04 05:50:53 +02:00
R E Broadley 2e36866fec Show nodeid instead of addresses (for anonymity) unless otherwise requested. 2014-07-04 09:38:44 +07:00