Commit graph

3317 commits

Author SHA1 Message Date
Pieter Wuille 20db1c099e Merge pull request #1778 from Diapolo/allow_explicit_bind
allow listening on -bind=address for blocked networks
2012-11-09 15:36:57 -08:00
Philip Kaufmann c73323eec9 allow listening on -bind=address for blocked networks
- this allows the client to listen on via -bind specified addresses
  (e.g. 127.0.0.1), even when a network (IPv4 in that case) was blocked
  via e.g -onlynet="Tor"
- introduce enum BindFlags to avoid passing multiple bools to Bind()
- make -bind help text clear we ALWAYS listen on the specified address
- remove an unused variable
- remove 2 unneeded IsLimited() checks before calling Bind(), which does
  these checks anyway

- usage case: specify -bind=127.0.0.1 -onlynet="Tor" to allow incoming
  connections to a Tor hidden service, but still don't allow other IPv4
  nodes to connect / get connected
2012-11-10 00:29:12 +01:00
Pieter Wuille c7075c4b65 Fix tests after cache tweaks 2012-11-10 00:09:57 +01:00
Pieter Wuille 485cf044ba Merge pull request #1943 from sipa/reindex2
Add -reindex, to perform in-place reindexing of block chain files
2012-11-09 14:50:30 -08:00
Jeff Garzik 8146591a53 Merge branch 'http-improvements'
The base bits of pull req #1982.
2012-11-09 17:34:25 -05:00
Pieter Wuille b41de54a2c Merge pull request #1978 from sipa/nodetach
Remove -detachdb and stop's detach argument.
2012-11-09 14:10:50 -08:00
Pieter Wuille 7fea484674 Add -reindex, to perform in-place reindexing of block chain files
Flushes the blktree/ and coins/ databases, and reindexes the
block chain files, as if their contents was loaded via -loadblock.

Based on earlier work by Jeff Garzik.
2012-11-09 01:06:32 +01:00
Pieter Wuille 7a5b7535bf Move ThreadImport to init.cpp 2012-11-09 01:06:32 +01:00
Pieter Wuille 05d9726805 LoadExternalBlockFile switched to CBufferedFile 2012-11-09 01:06:06 +01:00
Pieter Wuille b5d5f44c95 Add CBufferedFile 2012-11-09 01:06:06 +01:00
Pieter Wuille 16d9d61f99 Merge pull request #1981 from sipa/caches
Cache size optimizations
2012-11-08 14:17:37 -08:00
Wladimir J. van der Laan 86406daeca Merge pull request #1830 from Diapolo/trans_rem_spaces
fix some double-spaces in strings
2012-11-04 23:34:57 -08:00
Jeff Garzik fcf234fc08 RPC: HTTP server uses its own ReadHTTPRequestLine()
rather than reusing ReadHTTPStatus() from the client mode.

The following additional HTTP request validations are added, both in line with
existing HTTP client practice:

1) HTTP method must be GET or POST.  Most clients use POST, some
   use GET.  Either way, this continues to work.
2) HTTP URI must start with "/" character.
   Normal URI is "/" (a 1-char string), so this is fine.
2012-11-04 17:16:46 -05:00
Jeff Garzik 2306dc4b76 RPC, cosmetic: push down ReadHTTPStatus() calls into ReadHTTP() callers
ReadHTTPStatus() is currently overloaded:  In client mode, it properly parses
and receives an HTTP status line.  In server mode, it incorrectly parses the
HTTP request line as an HTTP status line.

This server mode bug has never mattered, because the RPC server never
cared about the URI (path) provided in the HTTP request.  That will change in
the future, so go ahead and begin fixing the problem.

This patch is cosmetic, and should result in NO behavior changes.

Further renames:
ReadHTTPHeader -> ReadHTTPHeaders
ReadHTTP -> ReadHTTPMessage
2012-11-04 16:06:38 -05:00
Pieter Wuille 1c83b0a377 Cache size optimizations 2012-11-04 18:06:25 +01:00
Pieter Wuille 92467073ad Remove -detachdb and stop's detach argument.
As the only BDB database left is the wallet, and it is always
detached.

Also remove IsChainFile() predicate and related chainfile-specific
logic.
2012-11-04 12:59:06 +01:00
Pieter Wuille a56d3f8a10 Merge pull request #1971 from sipa/bugfix_norelayspent
Bugfix: do not keep relaying spent wallet transactions
2012-11-03 11:51:13 -07:00
Pieter Wuille 7fac57786b Merge pull request #1973 from sipa/comconst
Comments for constants
2012-11-03 11:50:47 -07:00
Pieter Wuille 9d6633ac0d Comments for constants 2012-11-03 00:14:43 +01:00
Pieter Wuille f4112f87f9 Merge pull request #1972 from sipa/virtcoinsview
Add virtual destructor to CCoinsView
2012-11-01 17:36:54 -07:00
Pieter Wuille c9c7d4824f Add virtual destructor to CCoinsView 2012-11-01 22:54:06 +01:00
Pieter Wuille 5eaf91a428 Bugfix: do not keep relaying spent wallet transactions
The original test (checking whether the transaction occurs in the
txindex) is not usable anymore, as it will miss anything already
fully spent. However, as merkle transactions (and by extension,
wallet transactions) track which block they were last seen being
included in, we can use that to determine the need for
rebroadcasting.
2012-11-01 18:06:29 +01:00
Wladimir J. van der Laan a4f758b72c Merge pull request #1923 from Diapolo/Qt_tooltips
Bitcoin-Qt: use statustips in addition to tooltips
2012-11-01 00:26:35 -07:00
Philip Kaufmann 6f959c4cb3 Bitcoin-Qt: use statustips in addition to tooltips
- add setStatusTip() in addition to setTooltip() where it makes sense
- add only setStatusTip() if GUI element is only used in main- or tray menu

- add an event filter on our BitcoinGUI object to prevent garbelled text
  on the status bar, which happens when we use it for e.g. displaying
  block-sync state and then a QEvent::StatusTip wants to write own text to it

- remove a double translation of "Bitcoin client"
2012-10-31 08:05:27 +01:00
Wladimir J. van der Laan 578fc80003 Merge pull request #1932 from Diapolo/thread_printf
fix some thread related log messages
2012-10-30 23:19:35 -07:00
Pieter Wuille 41db7c224a Merge pull request #1963 from sipa/bugfix_nonewblock
Bugfix: don't crash by trying to write unchanged best block
2012-10-30 13:53:11 -07:00
Pieter Wuille cfec6b2c70 Merge pull request #1967 from TheBlueMatt/leveldbmakefile
Undo bad gitian update.
2012-10-29 14:11:55 -07:00
Matt Corallo b478337312 Undo bad gitian update. 2012-10-29 16:36:25 -04:00
Gavin Andresen a77bcaddbf Merge pull request #1935 from runeksvendsen/master
Add script to contrib/ that verifies authenticity of binaries hosted on SourceForge
2012-10-29 12:59:28 -07:00
Gavin Andresen ae8fc19788 Merge branch 'rawtx_p2sh' 2012-10-29 15:49:46 -04:00
Gregory Maxwell 155bdd90b9 Merge pull request #1966 from TheBlueMatt/leveldbmakefile
Build script fixes
2012-10-29 12:48:55 -07:00
Matt Corallo 38fe2e6a68 Add missing calls to ranlib in Windows makefiles 2012-10-29 15:43:18 -04:00
Matt Corallo 325a064c68 Upgrade to Qt 4.8.3 (because 4.8.2 was removed from qt repos?) 2012-10-29 15:43:18 -04:00
Matt Corallo f53b125507 Fix linux-mingw makefile's leveldb build by setting CXX. 2012-10-29 15:43:17 -04:00
Matt Corallo 3b4f8ad71d Use && instead of ; in leveldb calls to makefile. 2012-10-29 15:43:17 -04:00
Gavin Andresen 34226be7a8 New createmultisig rpc command
This is to support the signrawtransaction API call; given the public
keys involved in a multisig transaction, this gives back the redeemScript
needed to sign it.
2012-10-29 13:34:35 -04:00
Gavin Andresen 03346a61b1 Add redeemScript to listunspent output and signrawtransaction input
signrawtransaction was unable to sign pay-to-script-hash inputs
when given the list of private keys to use. With this commit
you can provide the p2sh redemption script in the list of
inputs.
2012-10-29 13:34:35 -04:00
Gavin Andresen 2d43f88e1f Tests for raw transactions argument checking 2012-10-29 13:34:35 -04:00
Gavin Andresen c4d884e20e No need for test fixture now that multisig is enabled on main network. 2012-10-29 13:34:35 -04:00
Pieter Wuille c13f5dbecf Merge pull request #1710 from sipa/dosp2sh
Remove P2SH transition code: P2SH violations may cause DoS trigger
2012-10-29 03:28:49 -07:00
Pieter Wuille 28982cc9dc Remove P2SH transition code: P2SH violations may cause DoS trigger 2012-10-29 00:41:39 +01:00
Pieter Wuille 0b297a614f Bugfix: don't crash by trying to write unchanged best block 2012-10-28 19:14:51 +01:00
Philip Kaufmann 6b3783a9c9 fix some double-spaces in strings
- remove some unneeded stuff in sendcoinsentry.ui
- harmonize some "Error:"-messages
2012-10-25 22:25:50 +02:00
Pieter Wuille bb790aa24d First flush block tree, then coin set
As the coinset data refers to the best block, stored in the block
tree. Flushing the coin set first can cause inconsistencies if
the process gets killed in between.
2012-10-25 20:47:17 +02:00
tucenaber 3026baaa7c Added checks for null pointers in Shutdown
Estetics
2012-10-25 20:45:38 +02:00
Pieter Wuille 344620e953 Merge pull request #1904 from laanwj/2012_10_remove_getorder
remove "checkorder" P2P command
2012-10-25 11:41:22 -07:00
Pieter Wuille e74d0ab675 Merge pull request #1899 from Diapolo/proxy_optionsmodel
make optionsmodel query real proxy state for ::data()
2012-10-25 11:33:59 -07:00
Pieter Wuille 66444558a5 Merge pull request #1953 from gmaxwell/createnewblock-race
Fixes a race condition in CreateNewBlock and a future null deref on testnet.
2012-10-25 11:30:51 -07:00
Philip Kaufmann 847593228d fix some thread related log messages
- "ThreadIRCSeed started" was not displayed, even if the thread ran
  (although only for a short time as the "do we want this thread?"-checks
  happen IN ThreadIRCSeed2())
- the patch ensures we always get that message
- add a "ThreadIRCSeed trying to connect..." message
- add missing "ThreadDumpAddress started" message
2012-10-25 16:12:40 +02:00
Wladimir J. van der Laan 1f7c5c5a3e Merge pull request #1926 from laanwj/2012_10_maindummybounds
Fix out-of-bounds read in main (issue #1924)
2012-10-25 06:12:10 -07:00