Commit Graph
286 Commits
Author SHA1 Message Date
Pieter WuilleandLuke Dashjr caad1add4f Free pwalletdbEncryption after encryping wallet
Fixes a memory leak.
2012-02-27 12:36:56 -05:00
Pieter WuilleandLuke Dashjr 69ce70866d Extra wallet locking fixes
* Fix sign error in calculation of seconds to sleep
* Do not mix GetTime() (seconds) and Sleep() (milliseconds)
* Do not sleep forever if walletlock() is called
* Do locking within critical section
2012-02-17 10:52:28 -05:00
Pieter WuilleandLuke Dashjr 8960f2fc33 Fix wallet locking locking 2012-02-17 09:38:20 -05:00
Pieter WuilleandLuke Dashjr 43163a5a4d Macros for manual critical sections 2012-02-17 09:38:13 -05:00
Pieter WuilleandLuke Dashjr d52397b3c0 Several shutdown-related fixes
* do not let vnThreadsRunning[1] go negative
* do not perform locking operations while vnThreadsRunning[1] is decreased
* check vnThreadsRunning[1] at exit
2012-02-17 09:02:21 -05:00
Pieter WuilleandLuke Dashjr 622f1438de Bugfix: do not create CAddress for invalid accepts 2012-02-17 09:00:48 -05:00
Matt CoralloandLuke Dashjr 888ac4e7a3 Get ext. IP from UPnP, make sure addrMe IsRoutable() in version.
This fixes a potential bug where some NATs may replace the node's
interal IP with its external IP in version messages, causing
incorrect checksums when version messages begin being checksummed
on February 14, 2012.
2012-02-11 21:25:35 -05:00
Pieter WuilleandLuke Dashjr 76e707a44e Fix #822 2012-02-11 20:50:43 -05:00
Luke Dashjr 4664aae3fe Update copyrights to 2012 for files modified this year 2012-02-07 22:30:50 -05:00
Gregory MaxwellandLuke Dashjr cac23a5a0b Have bitcoind recommend a secure RPC password. Increase invalid password delay.
Help users avoid insecure configurations a bit by recommending a
secure RPC password and increasing the incorrect password delay.

This may open up a RPC DOS for users with exposed RPC ports and
short passwords. Since users shouldn't have exposed RPC ports OR
short passwords, the DOS risk is preferable to the compromise
risk.

Also logs the client IP address for incorrect attempts.
2012-02-07 22:21:13 -05:00
Gavin AndresenandLuke Dashjr c11e2b8679 Only store transactions with missing inputs in the orphan pool.
All previous versions of bitcoin could store some types of
invalid transactions in the orphan-transaction list.
2012-02-02 20:03:33 -05:00
Pieter WuilleandLuke Dashjr d841fc969a Full checking of all loaded keys 2012-02-02 20:03:26 -05:00
Pieter WuilleandLuke Dashjr c1c6de6ad4 Check consistency of private keys
Reported by onlineproof on IRC: Bitcoin does not verify whether private
keys and public keys correspond, when loading a wallet.
2012-02-02 17:49:39 -05:00
Gavin AndresenandLuke Dashjr 1b6d8f3fca Allow -upnp to override setting in wallet (and simplify logic a bit) 2012-02-02 17:45:04 -05:00
Matt CoralloandLuke Dashjr e5b031f5d2 Fix UPnP by reannouncing every 20 minutes. 2012-02-02 17:44:42 -05:00
Gavin AndresenandLuke Dashjr edb563e8a5 Testnet difficulty calculation changes, to take effect Feb 15 2012
Allow mining of min-difficulty blocks if 20 minutes have gone by without mining a regular-difficulty block.
Normal rules apply every 2016 blocks, though, so there may be a very-slow-to-confirm block at the difficulty-adjustment blocks.
2012-02-02 17:44:04 -05:00
Daniel FolkinshteynandLuke Dashjr 54ed0a0432 Update seednodes, pick long-uptime nodes with version >= 0.4.0 2012-01-23 22:39:21 -05:00
Lars RasmussonandLuke Dashjr 1181bf86d1 Replace tabs with four spaces to comply with coding standard in doc/coding.txt 2012-01-23 22:37:48 -05:00
Luke Dashjr 948072c39f Code tidyups, fixing various warnings.
Partial cherry pick of:

Compile with extra warnings turned on. And more makefile/code tidying up.

This turns on most gcc warnings, and removes some unused variables and other code that triggers warnings.
Exceptions are:
 -Wno-sign-compare : triggered by lots of comparisons of signed integer to foo.size(), which is unsigned.
 -Wno-char-subscripts : triggered by the convert-to-hex functions (I may fix this in a future commit).

Conflicts:

	src/makefile.osx
	src/makefile.unix
	src/netbase.cpp
	src/rpc.cpp
2012-01-16 22:18:51 -05:00
Pieter WuilleandLuke Dashjr 880c478635 Remove unused definition 2012-01-10 19:46:04 -05:00
Luke Dashjr 6e1e62a04c Bump version to 0.4.4 2012-01-10 15:50:37 -05:00
Matt CoralloandLuke Dashjr 99e9601e80 Fix horrific performance found by gmaxwell. 2012-01-05 12:11:28 -05:00
Gavin AndresenandLuke Dashjr cc6bd19660 I broke -testnet with my TOR option-parsing fixes. 2012-01-03 12:17:54 -05:00
Gavin AndresenandLuke Dashjr 84393f15b6 Fix issue #659, and cleanup wallet/command-line argument handling a bit
Conflicts:
	src/init.cpp
	src/util.cpp
2012-01-03 11:48:44 -05:00
Pieter WuilleandLuke Dashjr b52b6f2e38 Fix some address-handling deadlocks
Made three critical blocks for cs_mapAddresses smaller, and moved
writing to the database out of them. This should also improve the
concurrency of the code.
2012-01-02 20:05:58 -05:00
Luke Dashjr 027d149352 Bugfix: fForRelay should be false when deciding required fee to include in blocks
During the rushed transition from 0.01 BTC to 0.0005 BTC fees, we took the
approach of dropping the relay and block-inclusion fee to 0.0005 BTC
immediately, and only delayed adjusting the sending fee for the next release.
Afterward, the relay fee was lowered to 0.0001 BTC to avoid having the same
problem in the future. However, the block inclusion code was left setting
fForRelay to true! This fixes that, so the lower 0.0001 BTC allowance is (as
intended) only permitted for real relaying.
2011-12-20 17:05:04 -05:00
Luke Dashjr 987f26aa1a Add my DNS seed domain 2011-12-19 14:38:26 -05:00
Matt CoralloandLuke Dashjr 6be2c9b5b4 Add sipa's new dnsseed. 2011-12-19 14:38:22 -05:00
Luke Dashjr 1f53204045 Bump version to 0.4.3 2011-12-15 19:25:29 -05:00
Luke Dashjr b379bc5eef Merge branch 'restore_old_miniupnp_compat' into 0.4.x 2011-12-12 14:33:47 -05:00
Luke Dashjr 94b97046fd Restore compatibility with miniupnpc 1.5 (without breaking miniupnp 1.6) 2011-12-10 11:52:50 -05:00
Matt CoralloandLuke Dashjr ba56a88ca5 Move DNS Seed lookup to a new thread. 2011-12-02 12:55:14 -05:00
Gavin AndresenandLuke Dashjr 5d901f1ba0 Orphan block fill-up-memory attack prevention 2011-12-01 23:20:32 -05:00
Gavin AndresenandLuke Dashjr 0e6425da4a Moved checkpoints out of main, to prep for using them to help prevent DoS attacks 2011-12-01 23:12:47 -05:00
Gavin AndresenandLuke Dashjr a7d735dcc2 Add missing command-line arguments to --help/-? output 2011-12-01 03:55:26 -05:00
Luke Dashjr d885aba347 Bump version to 0.4.2 2011-11-21 13:59:38 -05:00
Pieter WuilleandLuke Dashjr 36b1eb7631 close old db when rewriting 2011-11-20 13:53:07 -05:00
Gavin AndresenandLuke Dashjr 76ef6d89b9 Never remove database files on shutdown, it caused unreadable wallets on some testers' machines. 2011-11-20 13:52:59 -05:00
Gavin AndresenandLuke Dashjr c4a3bf9e55 Only remove database log files on shutdown after wallet encryption/rewrite 2011-11-17 14:29:18 -05:00
Gavin AndresenandLuke Dashjr 90de05e88e Create new keypool for newly encrypted wallets. 2011-11-17 14:29:12 -05:00
Jeff GarzikandLuke Dashjr 2bf36b4e7d Remove vladimir's DNS seed, at his request. 2011-11-15 17:39:38 -05:00
Gavin AndresenandLuke Dashjr 831d24a19d Tweak handling of boost filesystem versions
(partial cherry pick)
2011-11-15 17:00:38 -05:00
Gavin AndresenandLuke Dashjr 1aafd7464f Fix crash-on-osx-on-shutdown bug. And cleanup CDB handling in Rewrite. 2011-11-15 16:59:52 -05:00
Luke Dashjr 586ea168c2 add message about restarting bitcoin after encrypting wallet succesfully 2011-11-15 11:48:41 -05:00
Gavin AndresenandLuke Dashjr 0143c024af Fix boost filesystem incompatibility problem 2011-11-15 10:12:45 -05:00
Gavin AndresenandLuke Dashjr 2744ea8c1f Obsolete keypool and make sure database removes log files on shutdown. 2011-11-15 10:11:53 -05:00
Pieter WuilleandLuke Dashjr 00eae584a2 Resilvering 2011-11-15 10:03:31 -05:00
Matt CoralloandLuke Dashjr ef4280e08b Add returns to avoid annoying compile-time warnings. 2011-11-02 11:04:13 -04:00
Matt CoralloandLuke Dashjr ed176ba584 Only define __STDC_LIMIT_MACROS if not already defined. 2011-11-02 11:02:13 -04:00
cjdelisleandLuke Dashjr 38a976d5bb Added a workaround for an Ubuntu bug which causes -fstack-protector-all to be disregarded. 2011-11-02 10:59:48 -04:00